## #1520 is(equal(asinh(1), log(1 + sqrt(2)))); => false

closed
nobody
7
2010-01-31
2008-11-04
No

is(equal(asinh(1), log(1 + sqrt(2))));
=> false
(should be true)

Result is due to bigfloat evaluation of asinh(1) - log(1 + sqrt(2)), which yields a small positive residual. signbfloat=false disables bigfloat evaluation:

is(equal(asinh(1), log(1 + sqrt(2)))), signbfloat=false;
=> unknown

which is not entirely helpful, but at least it is not incorrect.

Not sure what to do here. Certainly we don't want the sign test to be too quick to return true or false, but if we make the numerical test more stringent, we could miss some otherwise-solvable problems.

## Discussion

• Barton Willis - 2008-11-04

I built Maxima using signbfloat : false. The test suite reports two problems
in rtest16; here is one problem testsuite problem (the other is similar):

OK with signbfloat : true:

(%i1) limit((%pi*4^N*N!^2)/(2*2^(2*N)*gamma(N+1/2)*gamma(N+3/2)), N, inf);
(%o1) 0

Not OK:

(%i2) signbfloat : false\$
(%i3) limit((%pi*4^N*N!^2)/(2*2^(2*N)*gamma(N+1/2)*gamma(N+3/2)), N, inf);
Is log(4) - 2 * log(2) positive, negative, or zero? zero;
Is 2 * log(2) - log(4) positive, negative, or zero? zero;
(%o3) 0

• Barton Willis - 2008-11-06

One way to get through the test suite with signbfloat : false is to add a
logcontract to the top of sign1:
(defun sign1 (x)
(let ((\$logconcoeffp '\$integerp))
(setq x (specrepcheck x))
(setq x (\$logcontract (infsimp* x)))

....)

I tested this with SBCL 1.0.22 + CVS Maxima.

• Dieter Kaiser - 2010-01-17

This error seems to be no longer present. We had changes to the implementation of the bigfloat routines. Perhaps because of these changes the example of this bug report works. This is my version:

Maxima version: 5.20post
Maxima build date: 1:2 1/17/2010
Host type: i686-pc-linux-gnu
Lisp implementation type: SBCL
Lisp implementation version: 1.0.29.11.debian

At this is the result:

(%i1) is(equal(asinh(1), log(1 + sqrt(2))));
(%o1) true

Setting the status to pending at the resolution to works for me.
Dieter Kaiser

• Dieter Kaiser - 2010-01-17
• status: open --> pending

• SourceForge Robot - 2010-01-31
• status: pending --> closed

• SourceForge Robot - 2010-01-31

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by