On Tue, Mar 4, 2014 at 6:52 PM, Bertram Moshier <bertrammosh...@gmail.com>wrote:

>
> I'm working on a program to compute Pi and noticed two interesting
> situations.
>
>    1. Bug #445 "RxMath functions do not honor precision on Windows" is
>    back.
>    2. Something I accept, but can't figure out why and would like to
>    understand.
>
> Bug 445: RxMath functions do not honor precision on Windows
>
> The Pi program I'm writing is using Chudnovsky and as such needs the
> square root of K3 to the same precision as the final result (say Pi to
> 100,000 places or even more).  Yet, when I call RxCalcSqrt(k3), the number
> of places is only 11, which is not close enough to provide valid results.
>

>From the rxmath doc:

The precision of calculation depends on:
* The value specified when the command is issued
* The numeric digits settings of the calling Rexx activity
Note
Precision is limited to 16 digits.

So, you are not going to get a precision greater than 16 digits no matter
what you do.  Try this:

RxCalcSqrt(k3, 16)

So, you can specify the precision as a second argument, but it can't be
greater than 16.

The rxmath package is just an interface to the C math library and has all
the restrictions of that library.


> I tried it and the result wasn't even close to the known results of Pi at
> the 100,000 places.
>
> As I read bug 445, Mark closed it as "Committed revision 986."  Thus it
> looks like bug 445 is back in 4.2.0 64-bit.
>

The bug was that when digits was set to 6 (or 5, or 4) the answer had the
same precision as when digits was 9.  In other words, it was not honoring
digits 6.  That bug is not back.


As for the second item Bert, I don't know.  ;-)  It's the kind of thing
that doesn't really interest me.  Maybe someone else will pipe up on that.

--
Mark Miesfeld
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to