Java normalized fixed-point
  • Java 70.2%
  • StringTemplate 29.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Mark Raynsford a67e4d23b3
Some checks are pending
main-RHEL10-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL10-x86_64-jdk26 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk25 / Build (push) Waiting to run
main-RHEL9-x86_64-jdk26 / Build (push) Waiting to run
Update workflows.
2026-07-31 18:42:55 +01:00
.forgejo Update workflows. 2026-07-31 18:42:55 +01:00
com.io7m.jnfp.core Move to new organization. 2024-04-30 19:30:48 +00:00
com.io7m.jnfp.tests Move to new organization. 2024-04-30 19:30:48 +00:00
src/site/resources Update site metadata. 2025-08-09 15:06:04 +00:00
.gitignore Update .gitignore. 2024-05-07 16:01:43 +00:00
.gitmodules Remove jenkins. 2024-04-30 19:31:13 +00:00
doc7m-books.json Add doc7m-books.json 2026-07-31 18:36:46 +01:00
pom.xml Migrate project. 2026-06-27 10:10:13 +01:00
README-CHANGES.xml Move to new organization. 2024-04-30 19:30:48 +00:00
README-LICENSE.txt Update LICENSE 2023-08-13 21:07:24 +00:00
README.in Migrate project. 2026-06-27 10:10:13 +01:00
README.md Migrate project. 2026-06-27 10:10:13 +01:00

jnfp

Maven Central Maven Central (snapshot) Java Version

com.io7m.jnfp

jnfp

Java functions to convert between floating point and normalized fixed point values.

Features

  • Conversion between unsigned normalized fixed-point numbers and floating point numbers.
  • Conversion between signed normalized fixed-point numbers and floating point numbers.
  • High coverage test suite.
  • OSGi-ready
  • JPMS-ready
  • ISC license.

Usage

Convert a floating point value to its 32-bit unsigned normalized fixed point representation:

var r = NFPUnsignedFloatLong.toUnsignedNormalized(0.25, 32);

Convert a 32-bit unsigned normalized fixed point value to its floating point representation:

var s = NFPUnsignedFloatLong.fromUnsignedNormalized(r, 32);

Classes exist for signed, unsigned, int, long, float, and double specializations.