zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

float_literals.zig (414B) - Raw


      1 const floating_point = 123.0E+77;
      2 const another_float = 123.0;
      3 const yet_another = 123.0e+77;
      4 
      5 const hex_floating_point = 0x103.70p-5;
      6 const another_hex_float = 0x103.70;
      7 const yet_another_hex_float = 0x103.70P-5;
      8 
      9 // underscores may be placed between two digits as a visual separator
     10 const lightspeed = 299_792_458.000_000;
     11 const nanosecond = 0.000_000_001;
     12 const more_hex = 0x1234_5678.9ABC_CDEFp-10;
     13 
     14 // syntax