There is colt.

The Colt library provides fundamental general-purpose data structures optimized for numerical data, such as resizable arrays, dense and sparse matrices (multi-dimensional arrays), linear algebra, associative containers and buffer management.

The Jet library contains mathematical and statistical tools for data analysis, powerful histogramming functionality, Random Number Generators and Distributions useful for (event) simulations, and more.

The CoreJava library contains C-like print formatting. The Concurrent library contains standardized, efficient utility classes commonly encountered in parallel & concurrent programming.

Answer from miku on Stack Overflow
🌐
W3Schools
w3schools.com › java › java_math.asp
Java Math
Java Examples Java Videos Java ... Plan Java Interview Q&A Java Certificate ... The Java Math class has many methods that allows you to perform mathematical tasks on numbers....
🌐
W3Schools
w3schools.com › java › java_ref_math.asp
Java Math Reference
Java Examples Java Videos Java ... Plan Java Interview Q&A Java Certificate ... The Java Math class has many methods that allows you to perform mathematical tasks on numbers....
🌐
W3Schools Blog
w3schools.blog › home › import math java
import math java - W3schools
January 23, 2022 - import java.lang.Math.*; Example class MathJava { public static void main(String[] args) { // Declaring the variables int num1 = -2; float num2 = .8f; // Printing the values System.out.println("Initial value of int : "+num1); System.out.println("Initial value of int : "+num2); // Use of .abs() ...
🌐
W3Schools
w3schoolsua.github.io › java › java_ref_math_en.html
Java Math Methods. Lessons for beginners. W3Schools in English
All Math Methods in Java. The Java Math class has many methods that allows you to perform mathematical tasks on numbers. All Math methods are static. Lessons for beginners. W3Schools in English
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › lang › Math.html
Math (Java Platform SE 8 )
October 20, 2025 - Java™ Platform Standard Ed. 8 ... The class Math contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
🌐
Tutorial Gateway
tutorialgateway.org › java-math-library
Java Math Library
March 28, 2025 - The Java Math Library provides various Functions & Properties and allows basic mathematical functionality like square root, cbrt, etc.
🌐
W3Schools
w3schoolsua.github.io › java › java_math_en.html
Java Math. Lessons for beginners. W3Schools in English
The Java Math class has many methods that allows you to perform mathematical tasks on numbers.
Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › java › java-math-class
Java Math Class - GeeksforGeeks
July 23, 2025 - System.out.println("The floor of " + x + " is " + Math.floor(x)); System.out.println("The floor of " + y + " is " + Math.floor(y)); // Comparison operators // min() returns the smaller of the two arguments // you pass it System.out.println("min(" + i + "," + j + ") is " + Math.min(i, j)); System.out.println("min(" + x + "," + y + ") is " + Math.min(x, y)); // There's a corresponding max() method // that returns the larger of two numbers System.out.println("max(" + i + "," + j + ") is " + Math.max(i, j)); System.out.println("max(" + x + "," + y + ") is " + Math.max(x, y)); // The Math library defines a couple of useful // constants: System.out.println("Pi is " + Math.PI); System.out.println("e is " + Math.E); // Trigonometric methods.
🌐
Google Sites
sites.google.com › view › manobal-sir › java-topics › java-mathematical-library-function
Manobal sir - Java mathematical library Function
JAVA math Function Java Math class provides several methods to work on math calculations like min(), max(), avg(), sin(), cos(), tan(), round(), ceil(), floor(), abs() etc. Basic Method with Description Math.abs() It will return the Absolute ...
🌐
Programiz
programiz.com › java-programming › library › math
Java Math Methods | Programiz
Java has a lot of Math methods that allow us to perform mathematical computations. In this reference page, you will find all the math methods available in Java.
🌐
O'Reilly
oreilly.com › library › view › learning-java › 1565927184 › ch09s02.html
Math Utilities - Learning Java [Book]
May 1, 2000 - Java supports integer and floating-point arithmetic directly. Higher-level math operations are supported through the java.lang.Math class. Java provides wrapper classes for all primitive data types, so you can treat them as objects if necessary.
Authors   Jonathan KnudsenPatrick Niemeyer
Published   2000
Pages   726
🌐
Reddit
reddit.com › r/adventofcode › java math libraries?
r/adventofcode on Reddit: Java math libraries?
December 26, 2023 -

One thing I learned this year is that maybe I should figure out how to use some math libraries/packages.

There are two problems that I ended up using a little outside help with. One was doing a polyfit. Especially, I have a list of input values and output results and I want the computer to tell me a function that matches. This is good for things where I'm sure there is a simple math relation, I just can't see it. For example in one problem, I had a series of numbers and needed polyfit to tell me I was actually looking at 5 + 2x + x^2 or something like that.

I ended up using python and numpy for that, which worked but I'd like to add that sort of capability to my Java tool kit.

The other, I kinda worked around but it would be nice to have is a symbolic math solver.

I've poked at Symja which has a enticing named solver:
https://bitbucket.org/axelclk/symja_android_library/wiki/Solve

But I'm having trouble getting the dependencies to run. Anyone have anything they like?

In case it matters, I'm using bazel to build, which means I can easily include anything that is on maven.

🌐
Tutorialspoint
tutorialspoint.com › java › java_lang_math.htm
Java - Math Class
The java.lang.Math class contains methods for performing basic numeric operations such as the elementary exponential, logarithm, square root, and trigonometric functions.
🌐
w3resource
w3resource.com › java-exercises › math › index.php
Java Math Exercises - w3resource
Java Math exercises of abs, acos, addexact, asin, atan, cbrt, ceil, copysign, cos, cosh, decrementexact, exp, floor, floordiv, floormod, getexponent, hypot, incrementexact, log,max, min, random and more from w3resource.
🌐
Maven Repository
mvnrepository.com › open-source › math-libraries
Maven Repository: Math Libraries
The Apache Commons Math project is a library of lightweight, self-contained mathematics and statistics components addressing the most common practical problems not immediately available in the Java programming language or commons-lang.
🌐
Baeldung
baeldung.com › home › java › java numbers › a guide to the java math class
A Guide to the Java Math Class | Baeldung
January 8, 2024 - In this tutorial, we’re going to describe the Math class that provides helpful static methods for performing numeric operations such as exponential, logarithm, etc.
🌐
Jenkov
jenkov.com › tutorials › java › math-operators-and-math-class.html
Java Math Operators and Math Class
Java contains a set of built-in math operators for performing simple math operations on Java variables. The Java math operators are reasonably simple. Therefore Java also contains the Java Math class which contains methods for performing more ...
🌐
Engineering LibreTexts
eng.libretexts.org › bookshelves › computer science › programming languages › java, java, java - object-oriented programming (morelli and walde) › 5: java data and operators
5.4: From the Java Library java.lang.Math - Engineering LibreTexts
September 20, 2021 - class provides many common mathematical functions that will prove useful in performing numerical computations. As an element of the java.lang package, it is included implicitly in all Java programs.