Class FloatAnalyzer

java.lang.Object
dev.gmitch215.bytebox.text.FloatAnalyzer

public final class FloatAnalyzer extends Object
The class library's FloatAnalyzer (TeaVM 0.15.0, org.teavm.classlib.impl.text), with its digits worked out by Exact.

This is what Float.toString, String.valueOf(float) and string concatenation of a float write digits from. The original multiplies by a 32-bit table entry, which leaves the value and the two edges of the interval of decimals that read back as the same float a few units of the last digit off, so some floats came out as text that is not the shortest, or does not read back as the float. Here every float goes through the exact route DoubleAnalyzer falls back on: there are no tables, so a program that prints floats gets smaller, and a call costs a microsecond or so.

Found through Substitutions. It replaces the class under its own name, so the PRECISION and MAX_POS the string builder reads are kept.