I don't think so. There's an extra operation involved here, which means
there's an extra place where rounding happens. -1004 is the number 1004
preceded by the prefix minus operation. Using "-1004" instead should
produce the same result as the binary minus.

Rick

On Mon, Nov 23, 2020 at 6:49 AM Erich Steinböck <erich.steinbo...@gmail.com>
wrote:

> Different results for a-b  and a+(-b) may well be a bug.
>
> ~~~
> numeric digits 3
> say (1005 - 1004) (1005 + (-1004)) -- 0 10
> ~~~
>
> On Mon, Nov 23, 2020 at 11:46 AM WalterPachl <pa...@chello.at> wrote:
>
>> Thanks
>>
>> so 370 == ooRexx <> Regina
>>
>> arithaa
>> REXX370 4.02 01 Dec 1998 ooRexx Regina
>> -20.98 + 1005 -> 980 980 990
>> 1005-20.98    -> 990 990 990
>> a=-20.98
>> b=1005a arithaa
>> REXX370 4.02 01 Dec 1998 ooRexx Regina
>> -20.98 + 1005 -> 980 980 990
>> 1005-20.98    -> 990 990 990
>> a=-20.98
>> b=1005
>> a+b           -> 980 980 980
>> b+a           -> 980 980 980
>>
>> Regards
>>
>> Walter
>>
> _______________________________________________
> 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

Reply via email to