I thought that we already beat this one to death.

If you preface your expression with "NUMERIC DIGITS 20" you will see that the 
answers are the same.  After each math operation rounding is performed.  So in 
repeated multiplication rounding is performed P times, while in the case of the 
power operator it is performed only once.

Your choice to accept the default value for "NUMERIC DIGITS" is what is causing 
the different results.

Sent from an undisclosed location.

> On Jan 7, 2015, at 8:03 AM, Erich Steinböck <erich.steinbo...@gmail.com> 
> wrote:
> 
> 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> wrote:
>> Section 10.2.1, Power Operator. 
>> 
>>> On Tue, Jan 6, 2015 at 7:44 PM, Walter Pachl <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] 
>>> 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
>>> 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
>> 
> 
> ------------------------------------------------------------------------------
> 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
------------------------------------------------------------------------------
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