Menu

X11 Basic outputs wrong value for a negative expoent value

2025-10-17
2025-10-18
  • Eric Erpelding

    Eric Erpelding - 2025-10-17

    In my version 1.27 X11 Basic MS Windows program I write
    G1 = 6.6743e-011
    but "Print G1" results in:
    8.839635186158e-062
    Why is this?

    EDIT: To get the correct value I have to write this in the source code.

    G1 = 6.6743/10^2
    G1 = G1*10

    then "Print G1" will give the correct value:
    6.6743e-011

     

    Last edit: Eric Erpelding 2025-10-17
  • Eric Erpelding

    Eric Erpelding - 2025-10-17

    Strange. ran this on another computer and got the correct result

    G=6.67e-11
    Print G

     
  • Eric Erpelding

    Eric Erpelding - 2025-10-18

    This comment is causing the problem!

    G1 = 6.6743E-11 ' m^3 kg^-1 s^-2

    The presence of this comment is affecting the value of the assignment.

     

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.