Menu

#2031 Power operation does not respect .Rexxinfo~internalMaxNumber

5.2.0
open
nobody
None
none
5
2025-09-15
2025-09-13
No
Say .rexxinfo~architecture
Say .rexxinfo~internalmaxnumber
Say 1.000001**9999999999

produces

64
999999999999999999
Oooops ! ... try again. Invalid whole number.
Operand to the right of the power operator (**) must be a whole number; found "9999999999"

but 5.4.17.12. internalMaxNumber says

Returns the maximum allowed value for internal whole numbers used e. g. as arguments to built-in
functions, as the right-hand operand of the power (**) operator, or as the values of exprr and exprf in a DO or LOOP instruction

(Underscoring is mine)

Discussion

  • Paul van den Eertwegh

    Hi Josep, numeric digits prevales before internalmaxnumber.
    With 9 digits, your 9999999999 (10 digits) is not a whole number.

    numeric digits 10
    Say .rexxinfo~architecture
    Say .rexxinfo~internalmaxnumber
    Say 1.000001**9999999999
    

    produces

    64
    999999999999999999
    8.762885303E+4342
    
     
  • Josep Maria Blasco

    Thanks, Paul. Yes, this is explained in rexxref 10.2.2 "Power". But then the description in 5.4.17.12 is clearly misleading.

     
  • Paul van den Eertwegh

    I agree...

     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB