From: Volker v. N. <vol...@gm...> - 2014-09-21 15:19:54
|
Hendrik, some Details on e and pi. The computation of e and pi is done by the functions fpe1 resp. fppi1 which are - as Richard Fateman already posted - in src/float.lisp . Before 2007 e was computed by it's Taylor series and pi by the formula pi = 6*asin(1/2) and the asin-series. In 2007 I replaced the asin-formula by the Chudnovsky-formula and for the computation of e I implemented a mechanism that combines a lot of Taylor summands to one. This mechanism uses the fact that division is expensive and multiplication of large integers is much cheaper. At that time I didn't know binary splitting. Binary splitting is also a mechanism to combine Taylor summands and also uses large integer multiplication but in contrast to my approach it is a recursive divide and conquer algorithm and provides better timings for high precisions. Very soon I will replace the current versions by the binary splitting variants (which are attached to my first mail in this thread). Volker van Nek Am 21.09.2014 09:59, schrieb Jan Hendrik Mueller: > Maybe I overlooked that: What was the "old" way maxima computed e and pi? > Is there a possibility to look at these codes for non developers? > bw > Jan > >> Am 20.09.2014 um 22:53 schrieb Raymond Toy <toy...@gm...>: >> >> >> >>> On Sat, Sep 20, 2014 at 2:58 AM, Volker van Nek <vol...@gm...> wrote: >>> Am 19.09.2014 20:35, schrieb Raymond Toy: >>>>>>>>> "Volker" == Volker van Nek <vol...@gm...> writes: >>>> >>>> Volker> [ I also implemented exp(x), log(x), sin(x) and friends for bigfloat x. >>>> Volker> In contrast to fpe1, .. these implementions are still some kind of raw >>>> Volker> material and need more error analysis. And of course it's a lot more >>>> Volker> difficult to merge them into Maxima. My idea is to put them into >>>> Volker> /share/contrib for now. ] >>>> >>>> Is there something wrong with the current implementations of these >>>> functions? >>>> >>>> Ray >>>> >>> >>> Ray, as I wrote in my last sentence I do not feel any pressure to >>> replace the current functions in src. >>> >>> After coding the binary splitting versions for the constants I was >>> curious to check out the other algorithms described in this paper. >>> >>> I thought it is worth to share the implementation of these algorithms. >>> Perhaps someone can use them or is simply interested to study them. >>> >>> The binary splitting variants are very fast and in some far future these >>> implementations might be worth to consider. At the moment I don't want >>> to risk breaking anything in src for the sake of speed advantages. >> >> Ok. I haven't looked at your code yet, but if they're significantly faster and not (much) less accurate, we should consider adding these. I'm sure we can come up with a nice set of tests to cover the code to show that it's good. >>> >>> Volker >>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Slashdot TV. Video for Nerds. Stuff that Matters. >>>> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk >>>> _______________________________________________ >>>> Maxima-discuss mailing list >>>> Max...@li... >>>> https://lists.sourceforge.net/lists/listinfo/maxima-discuss >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Slashdot TV. Video for Nerds. Stuff that Matters. >>> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk >>> _______________________________________________ >>> Maxima-discuss mailing list >>> Max...@li... >>> https://lists.sourceforge.net/lists/listinfo/maxima-discuss >> >> >> >> -- >> Ray >> ------------------------------------------------------------------------------ >> Slashdot TV. Video for Nerds. Stuff that Matters. >> http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk >> _______________________________________________ >> Maxima-discuss mailing list >> Max...@li... >> https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |