* Michael Jones <michael.jo...@gmail.com> [180430 13:54]:
> Andrey, that's great!
> 
> On the Fibonacci series evaluation, let's make sure that we're all doing
> the same calculation. For completeness and safety, let's skip all library
> values and derived values. Here are more-than-sufficient versions of the
> three constants in Yuval's code:

I think both of you missed the point of my message.  This has nothing to
do specifically with Fibonacci numbers.  The problem is simply that
math.Pow does not give as precise answers as the C++ std lib.  Look at
https://play.golang.org/p/_gVbAWjeoyW and notice that the result from
math.Pow is off in the 15th decimal digit.  Both the bigPow and the C++
pow library function are good until the 17th digit, which is what is
expected.  (Actually, I thought bigPow might do better, with the
specified precision of 300.)  I trust the Mathematica answer to be
correct to the number of digits printed (last digit rounded).

There is no math.Phi involved here, except that the hand-typed constant
happens to be as close as you can get to Phi in a float64 (but this is
not relevant to the test).

...Marvin

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to