tfloat6.nim 511 B

123456789101112131415161718192021222324
  1. discard """
  2. output: '''
  3. 1e-06 : 1e-06
  4. 1e-06 : 1e-06
  5. 0.001 : 0.001
  6. 1e-06 : 1e-06
  7. 1e-06 : 1e-06
  8. 10.000001 : 10.000001
  9. 100.000001 : 100.000001
  10. '''
  11. disabled: "windows"
  12. """
  13. import strutils
  14. echo "0.00_0001".parseFloat(), " : ", 1E-6
  15. echo "0.00__00_01".parseFloat(), " : ", 1E-6
  16. echo "0.0_01".parseFloat(), " : ", 0.001
  17. echo "0.00_000_1".parseFloat(), " : ", 1E-6
  18. echo "0.00000_1".parseFloat(), " : ", 1E-6
  19. echo "1_0.00_0001".parseFloat(), " : ", 10.000001
  20. echo "1__00.00_0001".parseFloat(), " : ", 1_00.000001