From: Mark Lee (mark at markelee.com) Date: Mon Dec 1 19:37:36 EST 2014 |
|
On 12/01/2014 06:17 PM, Neil Toronto wrote: > #lang racket > > (require racket/extflonum > math/bigfloat) > > (define phi.t 1.6180339887498948482t0) > > (real->extfl (bigfloat->real (bfexpt (bf (extfl->exact phi.t)) > (bf 1474)))) > (extflexpt phi.t 1474.0t0) To Neil, The evaluation of your code indicates they are the same. Interestingly, when my extfloat fibonacci code outputs a different solution from the wolfram alpha solution. Since I see differences in the mixed-integer and double flonum implementation, I think this is probably due to precision in calculating the golden ratio since I'm not using the built in phi. Thanks a lot! Regards, Mark ---(extfl->exact-integer (fibonacci-binet-extfloat (->extfl 1474)))---- 49922546054777678469368960618385043003363699372091997320161178553101214384627692576770903082349499224676352191140704886034527523514622364369317165742944965314856341231163850547175249260301355158481926463722577824611277339602822853152374805000431249526771373929335749513493133245637066106005248388530836602880