MCPcopy Create free account
hub / github.com/tensorflow/tfjs / getSuccinctNumberDisplay

Function getSuccinctNumberDisplay

tfjs-node/src/callbacks.ts:161–166  ·  view source on GitHub ↗
(x: number)

Source from the content-addressed store, hash-verified

159 * @return Succinct string representing `x`.
160 */
161export function getSuccinctNumberDisplay(x: number): string {
162 const decimalPlaces = getDisplayDecimalPlaces(x);
163 return decimalPlaces > MAX_NUM_DECIMAL_PLACES ?
164 x.toExponential(BASE_NUM_DIGITS) :
165 x.toFixed(decimalPlaces);
166}
167
168/**
169 * Determine the number of decimal places to display.

Callers 2

callbacks_test.tsFile · 0.90

Calls 1

getDisplayDecimalPlacesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…