#62Implement correct and compact printing of floating point numbers

  • avatar~clovercommented · 2 years ago
    Author
    Owner
            // TODO: minification
            .int32 => |val| try writer.print("{d}", .{val}),
            // TODO: correct printing of many value types
            .float => |val| try writer.print("{d}", .{val}),
    

    The first one is always correct, but ineffective (1000 should print "1e3"), but the second one is extremely problematic (Infinity should print Infinity [or 1/0], but it will currently print 0)


    Milestone: 0.3.0.

  • avatar~clover changed the status to Todo · 2 years ago