Skip to main content

float64 Type

Information

  • Used to describe floating-point numbers.
  • float64 provides approximately 15-16 decimal significant digits of precision.
  • float64 supports special values ±0, ±Infinity, NaN
  • Use number for assignment.

Example Usage

index.ts
import { Serializer, t } from "encodexx"
const serializer = new Serializer({
info: {
pi: t.float64,
inf: t.float64,
zero: t.float64,
}
})
serializer.encode({
info: {
pi: Math.PI,
inf: -Infinity,
zero: -0
}
});