java math accurate implementation & experiments

Overview

Marlin-Math

Accurate and fastest Math functions in java, like the Marlin renderer !

Rationale

Java supports Quadratic & Cubic curves in Java2D & JavaFX Graphics, that require good essential math functions:

  • Polynoms of 1 to 3 degrees (line, quad, cubic)
  • 2nd & 3rd order root finder
  • extrema, inflection points
  • intersections

Double-precision does not mean perfect accuracy, but BigDecimal impl is too costly. See wikipedia 'Loss of significance' that perfectly describe the problem:

  • floating-point numbers are inaccurate: ulp(x) is the number representing the smallest difference ~ 1E-16 * x
  • math operations (+ - * /) can produce high losses, ie the number is really far from the exact solution >> ulp

This project aims testing accuracy to get the upper bound of numerical errors, possibly use solver refinement to increase accuracy. However these functions must be the fastest possible ones according to the accuracy requirements.

License

As some code comes from OpenJDK, its license is the OpenJDK's license = GPL2 + ClassPath exception:

GNU General Public License, version 2, with the Classpath Exception

The GNU General Public License (GPL)

Version 2, June 1991

See License.md

Contributing

Contributions are welcomed, please report bugs, fork and share your improvements via pull requests.

Since we contribute parts of this library into OpenJDK, we accept contributions from people who have signed the Oracle Contribution Agreeement.

Related projects

  • Marlin-Renderer provides the Marlin renderer for Java2D (OpenJDK)
  • Marlin-FX provides the Marlin renderer for JavaFX (OpenJFX)
You might also like...

An Engine-Agnostic Deep Learning Framework in Java

An Engine-Agnostic Deep Learning Framework in Java

Deep Java Library (DJL) Overview Deep Java Library (DJL) is an open-source, high-level, engine-agnostic Java framework for deep learning. DJL is desig

Jan 7, 2023

Datumbox is an open-source Machine Learning framework written in Java which allows the rapid development of Machine Learning and Statistical applications.

Datumbox is an open-source Machine Learning framework written in Java which allows the rapid development of Machine Learning and Statistical applications.

Datumbox Machine Learning Framework The Datumbox Machine Learning Framework is an open-source framework written in Java which allows the rapid develop

Dec 9, 2022

java deep learning algorithms and deep neural networks with gpu acceleration

Deep Neural Networks with GPU support Update This is a newer version of the framework, that I developed while working at ExB Research. Currently, you

Jan 6, 2023

Java version of LIBLINEAR

This is the Java version of LIBLINEAR. The project site of the original C++ version is located at http://www.csie.ntu.edu.tw/~cjlin/liblinear/ The ups

Dec 11, 2022

Learning Based Java (LBJava)

Learning Based Java LBJava core LBJava examples LBJava maven plugin Compiling the whole package From the root directory run the following command: Jus

Jun 9, 2019

Kodlama IO | JAVA & REACT Projects

Kodlama IO | JAVA & REACT Projects

Human Resources Management System Creating a human resources system using Java-SpringBoot that can be used by employers, job seekers and system person

Oct 19, 2022

An Open Source Java Library for the Rubiks Cube!

An Open Source Java Library for the Rubiks Cube!

📑 Table of contents Overview What is Cubot? Why would you want it? Documentation Installation Updates 📔 Overview A Java library to help you : Virtua

Oct 17, 2022

Java Exp FrameWork

Exp Poc框架并不少,TangScan、Pocsuite 等等,用python写一个其实是很简单的事情。为什么要重复造这个轮子呢? 看过不少漏洞了,差不多都是本地很杂乱的存放poc,很多语言都有,而且大多数poc也只能弹个计算器而已.....所以很早就想拥有一个属于自己的统一存放Exp的地方,也

Oct 9, 2022

A Simple movies app using JAVA,MVVM and with a offline caching capability

A Simple movies app using JAVA,MVVM and with a offline caching capability

IMDB-CLONE A simple imdb clone using JAVA,MVVM with searching and bookmarking ability with offline caching ability screenshots Home Screen 1 Home Scre

Aug 16, 2022
Owner
Laurent Bourgès
Scientist & java expert & open-source contributor: OpenJDK, OpenJFX, IcedTea-Web...
Laurent Bourgès
👄 The most accurate natural language detection library for Java and the JVM, suitable for long and short text alike

Quick Info this library tries to solve language detection of very short words and phrases, even shorter than tweets makes use of both statistical and

Peter M. Stahl 532 Dec 28, 2022
Java project of math function and counting

This is program for some math function created by me. They are not exactly efficient, they are just for education purposses.

null 1 Feb 2, 2022
MathParser - a simple but powerful open-source math tool that parses and evaluates algebraic expressions written in pure java

MathParser is a simple but powerful open-source math tool that parses and evaluates algebraic expressions written in pure java. This projec

AmirHosseinAghajari 40 Dec 24, 2022
neutriNote - Markdown + Math in Just 3 MB!

Official | FAQ | Documentation | Mastodon | XDA neutriNote (Community Edition) What is neutriNote? In a nutshell, all-in-one preservation of written t

AppML 186 Jan 3, 2023
Math World is an android application specialized in mathematics discover more about it in README.

Math World App Math World is an Android Application specialized in mathematics, where the application includes some sections related to arithmetic, un

null 7 Mar 12, 2022
Hierarchical Temporal Memory implementation in Java - an official Community-Driven Java port of the Numenta Platform for Intelligent Computing (NuPIC).

htm.java Official Java™ version of... Hierarchical Temporal Memory (HTM) Community-supported & ported from the Numenta Platform for Intelligent Comput

Numenta 301 Dec 1, 2022
Just a simple implementation of K-Nearest Neighbour algorithm.

A simple K-Nearest Neighbor (KNN) Java library What is this repository for? Its a very simple implementation of K-Nearest Neighbor algorithm for Super

Felipe Appio 3 Apr 23, 2021
Reference implementation for MINAS (MultI-class learNing Algorithm for data Streams), an algorithm to address novelty detection in data streams multi-class problems.

Reference implementation for MINAS (MultI-class learNing Algorithm for data Streams), an algorithm to address novelty detection in data streams multi-class problems.

Douglas M. Cavalcanti 4 Sep 7, 2022
Java Statistical Analysis Tool, a Java library for Machine Learning

Java Statistical Analysis Tool JSAT is a library for quickly getting started with Machine Learning problems. It is developed in my free time, and made

null 752 Dec 20, 2022