Digits

Class of snx.dalvik · Digits.java

public final class Digits

A double's and a float's digits as ART prints them: OpenJDK's before JDK 19, which libcore's FloatingDecimal still is (1.0E23 is 9.999999999999999E22, 2.82879384806159E17 is 2.82879384806159008E17). The JDK prints the shortest digits that read back since JDK 19 (1.0E23), so the translator sends Double.toString, Float.toString and the calls that print a number as they do here (translate.c's remaps), and the framework's own printing calls these. The JDK keeps the old digits in jdk.internal.math.FloatingDecimal, which the driver exports to the framework (runtime/jvm.c). A box printed through Object.toString, String.valueOf(Object) or a Formatter's %s is the JDK's.

Methods

public static String toString(double d) source
public static String toString(float f) source
public static String toString(Double d) source

Double.toString() and Float.toString() of a box, which the translator sends here with the box first

public static String toString(Float f) source
public static String valueOf(Object o) source

A number as String.valueOf(Object) prints it on ART: a Double's and a Float's digits are ART's

public static StringBuilder append(StringBuilder b, double d) source
public static StringBuilder append(StringBuilder b, float f) source
public static StringBuffer append(StringBuffer b, double d) source
public static StringBuffer append(StringBuffer b, float f) source
public static StringBuilder insert(StringBuilder b, int offset, double d) source
public static StringBuilder insert(StringBuilder b, int offset, float f) source
public static StringBuffer insert(StringBuffer b, int offset, double d) source
public static StringBuffer insert(StringBuffer b, int offset, float f) source
public static void println(java.io.PrintStream s, double d) source
public static void println(java.io.PrintStream s, float f) source
public static void println(java.io.PrintWriter w, double d) source
public static void println(java.io.PrintWriter w, float f) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.