Closed timotheecour closed 4 years ago
/cc @disruptek to be consistent with: nim, python, C, C++, go, octave, matlab
#include <iostream> #include <stdio.h> int main (int argc, char *argv[]) { // double x = 1.00001E25; // will print 1.00001e+25 not 1.00001E+25 double x = 1.00001E25 / 0.0; // will print inf printf("%g\n", x); std::cout << x << std::endl; return 0; }
import math print(math.inf) print(1.0E22) # 1e+22 print(math.inf) # inf
package main import "fmt" func main() { fmt.Println(1.00001E25) # 1.00001e+25 }
octave:5> 112.0000**12 ans = 3.8960e+24
/cc @disruptek to be consistent with: nim, python, C, C++, go, octave, matlab
C, C++
python
go
octave, matlab