[Oorexx-devel] rxMath - rxm.class help sought

2014-04-05 Thread Walter Pachl
Rxm
5 March 2014

 

The distribution of ooRexx contains a function package called rxMath that
provides the computation of trigonometric and some other functions. 

Based on the underlying c-library the precision of the returned values is
limited to 16 digits. 

Close observation show that sometimes the last one or two digits of the
returned values are not correct. 

Many years ago I experimented with implementing these functions in Rexx with
its virtually unlimited precision. 

The rxm class is intended to provide the same functionality as rxMath with
no limit on the specified or implied precision. 

While I tried to get full compatibility there remain a few (actually very
few) differences:

 

-   RxCalcTan(90) raises the Syntax condition

-   rxCalcexp(x) limits x to 709. or so. 

 

Handling of syntactically incorrect arguments is still to be finished!

 

The program testexp.rex shows what I have coded so far.

You can see the 3 discrepancies when comparing rxm and rxMath.

The surprise (disappointment) is that condition('D') returns nothing
whatsoever

 

Any help / advice / critique would be highly appreciated

 

Thanks

 

Walter

 

PS rxmexp etc. will eventually be changed to rxCalcexp to become compatible
with rxMath!

 

 

Find the program at 

https://www.dropbox.com/sh/9v939j55ikderfx/SYLv80C-wP?n=132389230

 

--
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] rxMath - rxm.class help sought

2014-04-05 Thread Mark Miesfeld
Walter,

A good use of your skills.  I commend you on your work.  But, I can't over
any help.

--
Mark Miesfeld



On Sat, Apr 5, 2014 at 9:53 AM, Walter Pachl
christel.u.w.pa...@chello.atwrote:

 Rxm
5 March 2014



 The distribution of ooRexx contains a function package called rxMath that
 provides the computation of trigonometric and some other functions.

 Based on the underlying c-library the precision of the returned values is
 limited to 16 digits.

 Close observation show that sometimes the last one or two digits of the
 returned values are not correct.

 Many years ago I experimented with implementing these functions in Rexx
 with its virtually unlimited precision.

 The rxm class is intended to provide the same functionality as rxMath with
 no limit on the specified or implied precision.

 While I tried to get full compatibility there remain a few (actually very
 few) differences:



 -   RxCalcTan(90) raises the Syntax condition

 -   rxCalcexp(x) limits x to 709. or so.



 Handling of syntactically incorrect arguments is still to be finished!



 The program testexp.rex shows what I have coded so far.

 You can see the 3 discrepancies when comparing rxm and rxMath.

 The surprise (disappointment) is that *condition('D')* returns nothing
 whatsoever



 Any help / advice / critique would be highly appreciated



 Thanks



 Walter



 PS rxmexp etc. will eventually be changed to rxCalcexp to become
 compatible with rxMath!





 Find the program at

 https://www.dropbox.com/sh/9v939j55ikderfx/SYLv80C-wP?n=132389230




 --

 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] rxMath - rxm.class help sought

2014-04-05 Thread Rick McGuire
I'm not sure why there's such surprise/disappointment on Condition('D').
 To the best of my knowledge, no SYNTAX conditions return anything for
that.  If you wish to have something, you can specify a description on the
RAISE instruction.  Other than that, I'm not sure I can be much help here.
 I'm not totally surprised that a Rexx version of the calculation might
differ from a C library one in the last digit given that differences in how
the calculations are performed and rounding is done.

Rick


On Sat, Apr 5, 2014 at 12:53 PM, Walter Pachl
christel.u.w.pa...@chello.atwrote:

 Rxm
5 March 2014



 The distribution of ooRexx contains a function package called rxMath that
 provides the computation of trigonometric and some other functions.

 Based on the underlying c-library the precision of the returned values is
 limited to 16 digits.

 Close observation show that sometimes the last one or two digits of the
 returned values are not correct.

 Many years ago I experimented with implementing these functions in Rexx
 with its virtually unlimited precision.

 The rxm class is intended to provide the same functionality as rxMath with
 no limit on the specified or implied precision.

 While I tried to get full compatibility there remain a few (actually very
 few) differences:



 -   RxCalcTan(90) raises the Syntax condition

 -   rxCalcexp(x) limits x to 709. or so.



 Handling of syntactically incorrect arguments is still to be finished!



 The program testexp.rex shows what I have coded so far.

 You can see the 3 discrepancies when comparing rxm and rxMath.

 The surprise (disappointment) is that *condition('D')* returns nothing
 whatsoever



 Any help / advice / critique would be highly appreciated



 Thanks



 Walter



 PS rxmexp etc. will eventually be changed to rxCalcexp to become
 compatible with rxMath!





 Find the program at

 https://www.dropbox.com/sh/9v939j55ikderfx/SYLv80C-wP?n=132389230




 --

 ___
 Oorexx-devel mailing list
 Oorexx-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/oorexx-devel


--
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel


Re: [Oorexx-devel] rxMath - rxm.class help sought

2014-04-05 Thread Mike Cowlishaw
 
 thank you for the quick replies!
 Just reading/skimming my program and telling me if/what I 
 should do differently would save me from repeating blunder 
 for all the other routines (I mean the checking for correct arguments)

I'm a bit 'burned out' on arithmetic functions, but for the suggested way to
treat edge cases of sundry functions, the IEEE 754-2008 standard's
recommendations are the current state of the art.  e-mail me if you'd like an
excerpt.

Mike
[IEEE 754 Editor :-)]


--
___
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel