Menu

#1988 FORMAT returns invalid number

5.1.0
invalid
nobody
None
none
5
2024-11-19
2024-11-19
No

Running below code snippet under Windows 11, latest version:

parse version version
say version
numeric digits 20
a = 1/(6 * 1e15)
say 'value' a
numeric digits 40
b = format(a)
say 'format' b
say 'plus 1' b+1

produces

REXX-ooRexx5.0.0(MT)64-bit 6.05 23 Dec 2022
value 0.00000000000000016666666666666666667
format 0.00000000000000016666666666666666667000000000000►█^
     9 - say 'plus 1' b+1
Error 41 running C:\Rex\Complex\Paul.rex line 9:  Bad arithmetic conversion.
Error 41.1:  Nonnumeric value ("0.00000000000000016666666666666666667000000000000??^") used in arithmetic operation.

Many other combinations of numeric digits and exponent are running OK.

Related

Bugs: #1988

Discussion

  • m-stgt

    m-stgt - 2024-11-19

    Same here:

    REXX-ooRexx_5.0.0(MT)_32-bit 6.05 23 Dec 2022
    value 0.00000000000000016666666666666666667
    format 0.0000000000000001666666666666666666700000000h*00
         9 *-* say 'plus 1' b+1
    Error 41 running C:\PRGM\rexx\fmtrr.rx line 9:  Bad arithmetic conversion.
    Error 41.1:  Nonnumeric value ("0.0000000000000001666666666666666666700000000h*00") used in arithmetic operation.
    

    BTW, my laptop is UTF-8 enabled.

    Best,
    M.

     
  • AvdP

    AvdP - 2024-11-19

    FWIW, my output on WIN10 64-bit with a recent oRexx 32-bit seems ok:

    REXX-ooRexx_5.1.0(MT)_32-bit 6.05 19 Sep 2024
    value 0.00000000000000016666666666666666667
    format 0.00000000000000016666666666666666667
    plus 1 1.00000000000000016666666666666666667
    
     
  • Erich

    Erich - 2024-11-19
    • status: open --> invalid
     
    • Per Olov Jonsson

      Hi Erich,

      When I run this on ooRexx built fresh today on macOS Sonoma I get this

      version REXX-ooRexx_5.1.0(MT)_64-bit 6.05 19 Nov 2024
      value 0.00000000000000016666666666666666667
      format 0.00000000000000016666666666666666667000000000000?(?
      20 - say 'plus 1' b+1
      Error 41 running /Users/po/Downloads/test.REX line 20: Bad arithmetic conversion.
      Error 41.1: Nonnumeric value ("0.00000000000000016666666666666666667000000000000?(?") used in arithmetic operation.

      The code I ran was this

      parse version version
      say 'version' version
      numeric digits 20
      a = 1/(6 * 1e15)
      say 'value' a
      numeric digits 40
      b = format(a)
      say 'format' b
      say 'plus 1' b+1

      Is this how it should be or was the fix only made on Windows?

      Hälsningar/Regards/Grüsse,
      P.O. Jonsson
      oorexx@jonases.se

      Am 19.11.2024 um 17:46 schrieb Erich erich_st@users.sourceforge.net:

      • status: open --> invalid
      • Comment:

      This was fixed with [bugs:#1947] FORMAT issues.
      Closing as duplicate.


      [bugs:#1988] FORMAT returns invalid number

      Status: invalid
      Group: 5.1.0
      Created: Tue Nov 19, 2024 01:28 PM UTC by Paul van den Eertwegh
      Last Updated: Tue Nov 19, 2024 04:40 PM UTC
      Owner: nobody

      Running below code snippet under Windows 11, latest version:

      ~~~
      parse version version
      say version
      numeric digits 20
      a = 1/(6 * 1e15)
      say 'value' a
      numeric digits 40
      b = format(a)
      say 'format' b
      say 'plus 1' b+1
      ~~~

      produces

      ~~~
      REXX-ooRexx5.0.0(MT)64-bit 6.05 23 Dec 2022
      value 0.00000000000000016666666666666666667
      format 0.00000000000000016666666666666666667000000000000►█^
      9 - say 'plus 1' b+1
      Error 41 running C:\Rex\Complex\Paul.rex line 9: Bad arithmetic conversion.
      Error 41.1: Nonnumeric value ("0.00000000000000016666666666666666667000000000000??^") used in arithmetic operation.
      ~~~

      Many other combinations of numeric digits and exponent are running OK.


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oorexx/bugs/1988/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1947
      Bugs: #1988

      • Per Olov Jonsson

        Erich, I take that back, I was building with a rotten SVN. Sorry. This is how it looks now:

        version REXX-ooRexx_5.1.0(MT)_64-bit 6.05 19 Nov 2024
        value 0.00000000000000016666666666666666667
        format 0.00000000000000016666666666666666667
        plus 1 1.00000000000000016666666666666666667

        So all is well also on MacOS

        Hälsningar/Regards/Grüsse,
        P.O. Jonsson
        oorexx@jonases.se

        Am 19.11.2024 um 18:59 schrieb P.O. Jonsson oorexx@jonases.se:

        Hi Erich,

        When I run this on ooRexx built fresh today on macOS Sonoma I get this

        version REXX-ooRexx_5.1.0(MT)_64-bit 6.05 19 Nov 2024
        value 0.00000000000000016666666666666666667
        format 0.00000000000000016666666666666666667000000000000?(?
        20 - say 'plus 1' b+1
        Error 41 running /Users/po/Downloads/test.REX line 20: Bad arithmetic conversion.
        Error 41.1: Nonnumeric value ("0.00000000000000016666666666666666667000000000000?(?") used in arithmetic operation.

        The code I ran was this

        parse version version
        say 'version' version
        numeric digits 20
        a = 1/(6 * 1e15)
        say 'value' a
        numeric digits 40
        b = format(a)
        say 'format' b
        say 'plus 1' b+1

        Is this how it should be or was the fix only made on Windows?

        Hälsningar/Regards/Grüsse,
        P.O. Jonsson
        oorexx@jonases.se

        Am 19.11.2024 um 17:46 schrieb Erich erich_st@users.sourceforge.net:

        • status: open --> invalid
        • Comment:

        This was fixed with [bugs:#1947] FORMAT issues.
        Closing as duplicate.


        [bugs:#1988] FORMAT returns invalid number

        Status: invalid
        Group: 5.1.0
        Created: Tue Nov 19, 2024 01:28 PM UTC by Paul van den Eertwegh
        Last Updated: Tue Nov 19, 2024 04:40 PM UTC
        Owner: nobody

        Running below code snippet under Windows 11, latest version:

        ~~~
        parse version version
        say version
        numeric digits 20
        a = 1/(6 * 1e15)
        say 'value' a
        numeric digits 40
        b = format(a)
        say 'format' b
        say 'plus 1' b+1
        ~~~

        produces

        ~~~
        REXX-ooRexx5.0.0(MT)64-bit 6.05 23 Dec 2022
        value 0.00000000000000016666666666666666667
        format 0.00000000000000016666666666666666667000000000000►█^
        9 - say 'plus 1' b+1
        Error 41 running C:\Rex\Complex\Paul.rex line 9: Bad arithmetic conversion.
        Error 41.1: Nonnumeric value ("0.00000000000000016666666666666666667000000000000??^") used in arithmetic operation.
        ~~~

        Many other combinations of numeric digits and exponent are running OK.


        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oorexx/bugs/1988/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         

        Related

        Bugs: #1947
        Bugs: #1988

  • Erich

    Erich - 2024-11-19

    This was fixed with [bugs:#1947] FORMAT issues.
    Closing as duplicate.

     

    Related

    Bugs: #1947

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB