4 ms·
Arg, no... please no float as the default(only) numeric type. That's one of the worst things about javascript.
by NateDad 13y ago
Arg, no... please no float as the default(only) numeric type. That's one of the worst things about javascript.
- tlb 13y agoWhy do you think that? I find JS's numeric rules (float, except when you use bitwise operators) quite convenient and safe. Some examples of things that are awkward with float-only numeric would be helpful.
- millstone 13y agoGo's floating point support is sort of FUBAR. For example, these three equivalent snippets all produce different results: 1. fmt.Printf("%f", 1.0 / -0.0); 2. x := -0.0; fmt.Printf("%f", 1.0 / x); 3. x := 0.0; fmt.Printf("%f", 1.0 / -x);