Part XII — Numerics and Vector API

Master modern numeric operations, random number generation, and SIMD programming with the Vector API.

What You'll Learn

Work with numbers correctly: use RandomGenerator family for reproducibility and performance across different use cases. Model monetary and scientific values precisely with BigDecimal and BigInteger. Explore the cutting-edge Vector API for data-parallel computation on modern CPUs.

Chapters in This Part

Chapter 39. Random

Generate random numbers efficiently with the modern RandomGenerator interface family. Understand different algorithm choices (Xoroshiro128PlusPlus, SecureRandom), seeding strategies, and when to use stateless generators like SplittableRandom in parallel streams.

Chapter 40. Big Numeric

Handle arbitrarily large and precise numbers with BigInteger and BigDecimal. Learn decimal arithmetic for financial calculations, understand scale and rounding modes, and see performance considerations for working with big numbers.

Chapter 41. Vector API

Introduce SIMD (Single Instruction Multiple Data) programming with the Vector API—currently in preview. Learn vector operations, lane-wise computation, and how vectorization accelerates data-parallel workloads on modern CPUs.

Chapter 42. Linear Algebra and Matrix Computations

Implement cache-friendly matrix and vector operations in pure Java. Cover array layouts, BLAS-like primitives, blocked matrix multiplication, numerical stability, and performance measurement.

Chapter 43. FFT and Signal Processing

Efficient Fast Fourier Transform algorithms for frequency‑domain analysis. Cover DFT fundamentals, radix‑2 Cooley–Tukey FFT, real‑valued optimizations, windowing functions, convolution via FFT, and performance tuning.

Chapter 44. Numeric Formatting and Precision Control

Master numeric display with NumberFormat, DecimalFormat, and custom patterns. Cover locale-aware currency/percent formatting, precision control, rounding modes, thread safety, and performance optimization for reliable numeric output.

Chapter 45. Mathematical Functions and Numerical Methods

Essential mathematical functions and numerical algorithms. Cover Math vs StrictMath, transcendental and special functions, Newton-Raphson root finding, numerical integration (trapezoidal, Simpson's), interpolation, error analysis, and performance tuning.