Maxima is printing what I consider a strange result on two Solaris machines,
when computing the asinh
of 1.0. The leading zero is not printed, so a doctest
which fails a doctest
The Maxima developers can reproduce similar examples on Linux machines and seem
to see this more as a feature than a bug, as it allows printing more digits in
the 17 places allocated to printing numbers.
How should this doctest be changed so it passes?
What seems easiest to me, is just to change the test. So instead of finding the
asinh of 1.0, we do it of 2.0
That gives a number > 1, so the problem with the missing leading zero goes. For
the point of view of a test, I don't see it really matters what the value is
going to be chosen.
A higher precision result of this, which I computed with Mathematica is:
It so happens I get *exactly* the same result then on all these machines.
* sage.math (Linux)
* bsd.math (OS X)
* t2.math (Solaris 10 on SPARC)
* fulvia @ skynet (Solaris 10 on x86)
* My Ultra 27 (OpenSolaris on x86)
In all cases, all digits are in fact correct - at least they agree with a higher
precision result I computed with Mathematica.
So I propose we change symbolic/expression.pyx to compute the asinh(2.0) instead
of asinh(1.0), and set the expected result to 1.44363547517881, as that's that
result is correct in every digit, and is given on all the machines where I have
managed to try Sage.
Does that seem a reasonable change?
Perhaps setting the expected result to 1.4436354751788... might be better, as
that will allow a bit of room for numerical noise, though all machines I've
tested on give exactly the same result.