Menu

iso7185pat.pas

2016-01-31
2017-12-07
  • Trevor Blight

    Trevor Blight - 2016-01-31

    A few errors have been raised on iso7185pat.pas and fixing them will take a little time.

    I'd like to propose that you take the version from the p5c project ( find it here).
    These errors have already been fixed there, and in addition:

    • the output has been tweaked so that it can be scanned automatically

    • I'd rather not maintain a forked version of the test (!)

    • it has some logic to count the number of signifacant digits in real numbers. This helps the test become independent of various compilers' different levels of accuracy in real numbers.

    I'd suggest the first point above gives the biggest benefit - it gives an independent method of checking the test results. File differences and computer scanning can each allow errors to slip through the net, but when combined, the chance of an incorrect test result is reduced by an order of magnitude.

    The scanning program is here and more details are inside that file.

     

    Last edit: Trevor Blight 2016-01-31
    • Scott Franco

      Scott Franco - 2016-02-01

      "the output has been tweaked so that it can be scanned automatically"

      Which means you undoubtedly found a few cases where the "s/b"s don't match the actual output.

      A very valuable tool. I take it you don't mind if I copy that back to P5?

      How does it feel to be the only programmer left in the world who understands AWK?
      (sorry, just had to).

       
      • Trevor Blight

        Trevor Blight - 2016-02-03

        "A very valuable tool. I take it you don't mind if I copy that back to P5?"
        please do.

        And I'd be glad if you found other useful stuff to take back.

         
        • Scott Franco

          Scott Franco - 2016-02-03

          Or we could just merge the two products.

           
  • Reinhard

    Reinhard - 2016-01-31

    OK, thanks, I used that to test my pasm.c/pint.c. There are still alot of issues due to width left:

    Real1: 1.55400000e+00 s/b 1.554000e+00
    Real2: 3.34000000e-03 s/b 3.340000e-03
    Real3: 3.34000000e-24 s/b 3.34000e-24
    Real4: 4.00000000e-45 s/b 4.000000e-45
    Real5: -5.56500000e+00 s/b -5.565000e+00
    Real6: -9.44000000e-03 s/b -9.440000e-03
    Real7: -6.36400000e+29 s/b -6.364000e+29
    Real8: -2.00000000e-14 s/b -2.000000e-14
    Real9:
    11111111112222222222333333333344444444445
    12345678901234567890123456789012345678901234567890
    1.23e+00
    1.23e+00
    1.23e+00
    1.23e+00
    1.23e+00
    1.23e+00
    1.23e+00
    1.23e+00
    1.23e+00
    1.235e+00
    1.2346e+00
    1.23457e+00
    1.234568e+00
    1.2345679e+00
    1.23456789e+00
    1.234567890e+00
    1.2345678901e+00
    1.23456789012e+00
    1.234567890123e+00
    1.2345678901235e+00
    1.23456789012346e+00
    1.234567890123457e+00
    1.2345678901234567e+00
    s/b:
    11111111112222222222333333333344444444445
    12345678901234567890123456789012345678901234567890
    1.2e+000
    1.2e+000
    1.2e+000
    1.2e+000
    1.2e+000
    1.2e+000
    1.2e+000
    1.2e+000
    1.23e+000
    1.235e+000
    1.2346e+000
    1.23457e+000
    1.234568e+000
    1.2345679e+000
    1.23456789e+000
    1.234567890e+000
    1.2345678901e+000
    1.23456789012e+000
    1.234567890123e+000
    1.2345678901235e+000
    1.23456789012346e+000
    1.234567890123457e+000
    1.2345678901234568e+000

    Real11: 1.41890000e+03 s/b 1.418900e+03
    Rea112: 5.48440000e+02 s/b 5.484400e+02
    Real13: 4.28122694e+05 s/b 4.281227e+05
    Real14: 2.26011534e+00 s/b 2.260115e+00

    Real29: 4.35230000e+02 s/b 4.35230e+02
    Real30: 1.89425153e+05 s/b 1.89425e+05
    Real31: 3.13635138e+01 s/b 3.13635e+01
    Real32: -3.44305942e-01 s/b -3.44306e-01
    Real33: 1.56849870e+00 s/b 1.56850e+00
    Real34: 1.41100187e+00 s/b 1.41100e+00
    Real35: 6.07587463e+00 s/b 6.07587e+00
    Real39: 1.27805200e+03 s/b 1.278052e+03
    Real40: 2.38946000e+02 s/b 2.389460e+02
    Real41: 1.04720175e+05 s/b 1.047202e+05
    Real42: 7.25959751e-03 s/b 7.259598e-03

    Real57: 3.49300000e+01 s/b 3.493000e+01
    Real58: 5.47560000e+00 s/b 5.475600e+00
    Real59: 9.72333276e+01 s/b 9.723333e+01
    Real60: 3.31147273e-01 s/b 3.311472e-01
    Real61: 1.56788258e+00 s/b 1.567883e+00
    Real62: 1.39375285e+00 s/b 1.393753e+00
    Real63: 4.42148770e+00 s/b 4.421488e+00

    Real67: 4.33300000e+01 s/b 4.333000e+01
    Real68: 3.00340000e+02 s/b 3.003400e+02
    Real69: 3.00340000e+02 s/b 3.003400e+02
    Real70: -6.59998000e+03 s/b -6.599980e+03
    Real71: -8.36872000e+03 s/b -8.368720e+03
    Real72: 1.76874000e+03 s/b 1.768740e+03
    Real73: -8.66906000e+03 s/b -8.669061e+03
    Real74: -6.90032000e+03 s/b -6.900320e+03
    Real75: -7.59559268e+05 s/b -7.595593e+05
    Real76: -7.59559268e+05 s/b -7.595593e+05
    Real77: 5.60526458e+06 s/b 5.605265e+06
    Real78: -1.40907110e+00 s/b -1.409071e+00
    Real79: -7.37962766e+00 s/b -7.379627e+00
    Real80: 1.03984200e+01 s/b 1.039842e+01

    Real103: 7.34200000e+02 s/b 7.34200e+02
    Real104: 5.39049640e+05 s/b 5.39050e+05
    Real105: -4.34832062e-01 s/b -4.34832e-01
    Real106: -1.56943430e+00 s/b -1.569434e+00
    Real107: 6.80566323e-01 s/b 6.80566e-01

    Real111: 1.51000000e+01 s/b 1.510000e+01
    Real112: 4.51330000e+01 s/b 4.513300e+01
    Real113: -3.86400000e+01 s/b -3.864000e+01
    Real114: -3.65810000e+01 s/b -3.658100e+01
    Real115: 3.55480000e+01 s/b 3.554800e+01
    Real116: -4.93984000e+01 s/b -4.939840e+01
    Real117: -4.40010000e+01 s/b -4.400100e+01
    Real118: -2.64122320e+01 s/b -2.641223e+01
    Real119: -1.48904140e+02 s/b -1.489041e+02
    Real120: 5.58563248e+02 s/b 5.585632e+02
    Real121: -5.22015662e+00 s/b -5.220157e+00
    Real122: -1.77216253e+01 s/b -1.772163e+01
    Real123: 4.27458238e+00 s/b 4.274582e+00

    Real146: 6.82300000e+00 s/b 6.823000e+00
    Real147: 1.21257168e+05 s/b 1.212572e+05
    Real148: 9.42124497e-01 s/b 9.421245e-01
    Real149: -1.57067710e+00 s/b -1.570677e+00
    Real150: 4.17153925e-01 s/b 4.171539e-01

    Real154: -8.42200000e+01 s/b -8.422000e+01
    Real155: 8.42200000e+01 s/b 8.422000e+01
    Real156: -4.33300000e+01 s/b -4.333000e+01
    Real157: 8.42200000e+01 s/b 8.422000e+01

    File9:
    7384
    8342
    true
    false
    m
    q
    1.23456780e+00
    1.2345678
    5.68943210e+01
    0.93837632
    hi there !
    hi th
    hi there !
    s/b:
    7384
    8342
    true
    false
    m
    q
    1.2345678000e+00
    1.2345678
    5.6894321000e+01
    0.93837632
    hi there !
    hi th
    hi there !
    File10:
    7384
    8342
    m
    q
    1.23456780e+00
    1.23456780e+00
    5.68943210e+01
    9.38376320e-01
    s/b:
    7384
    8342
    m
    q
    1.2345678000e+00
    1.2345678000e+00
    5.6894321000e+01
    9.3837632000e-01

    There is the odd 3-digit exponent (in one place only)
    and many places where the s/b width is bigger than the width specified in the write statement of that real (often by 2: write(real:15) but s/b uses 17 places)

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.