Regina does the same!

say rxcalcpower(n,p)  gives …1

::requires rxmath library

 

Von: Erich Steinböck [mailto:erich.steinbo...@gmail.com] 
Gesendet: Mittwoch, 07. Jänner 2015 17:03
An: Open Object Rexx Developer Mailing List
Betreff: Re: [Oorexx-devel] 200**4

 

Some years ago I noticed that the Power operator ** won't always give exactly 
the same result as repeated multiplication, as described in 10.2.1. "For 
calculating the power, the number is multiplied by itself for the number of 
times expressed by the power."

An example is:


rexx -e "N=1.01; P=8; R=1; do P; R*=N; end; say N**P R"
-> 1.08285671 1.08285670

 

On Wed, Jan 7, 2015 at 1:46 AM, Rick McGuire <object.r...@gmail.com 
<mailto:object.r...@gmail.com> > wrote:

Section 10.2.1, Power Operator. 

 

On Tue, Jan 6, 2015 at 7:44 PM, Walter Pachl <christel.u.w.pa...@chello.at 
<mailto:christel.u.w.pa...@chello.at> > wrote:

Thank you very much!

Unfortunately I have TRL2 only (incompletely) in my head

I guess this cannot be found in the ooRexx Reference, can it?

Walter

 

Von: Rick McGuire [mailto:object.r...@gmail.com <mailto:object.r...@gmail.com> 
] 
Gesendet: Mittwoch, 07. Jänner 2015 01:35
An: Open Object Rexx Developer Mailing List
Betreff: Re: [Oorexx-devel] 200**4

 

>From TRL2, page 132 in the definition of the power operator"

 

"...and finally, trailing zeros are removed (as though the result were divided 
by one)."

 

ooRexx is working according to the language definition. 

 

Rick 

 

 

 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net <mailto:Oorexx-devel@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

 


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net <mailto:Oorexx-devel@lists.sourceforge.net> 
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

 

------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to