# \#numerics

**URL:** https://discourse.julialang.org/tag/numerics/295.md

[Latest](https://discourse.julialang.org/latest.md) · [Categories](https://discourse.julialang.org/categories.md) · [Tags](https://discourse.julialang.org/tags.md)

---

## [\[ANN\] MathChecker.jl: Find problems in floating-point calculations](https://discourse.julialang.org/t/ann-mathchecker-jl-find-problems-in-floating-point-calculations/139261)

<div class="topic-metadata">

**Author:** [@moble](https://discourse.julialang.org/u/moble)\
**Replies:** 6\
**Last updated:** [September 10, 2026, 4:01pm UTC](https://discourse.julialang.org/t/ann-mathchecker-jl-find-problems-in-floating-point-calculations/139261 "2026-09-10T16:01:50Z")

</div>

I’m always surprised this isn’t a bigger topic of conversation among Julia users: how to find where problems are coming from in numerics. The gap between our pretty equations and algorithms on one hand, and practical …

---

## [\[ANN\] Sparlectra.jl v0.8.2 – transparent AC power-flow and state estimation](https://discourse.julialang.org/t/ann-sparlectra-jl-v0-8-2-transparent-ac-power-flow-and-state-estimation/137349)

<div class="topic-metadata">

**Author:** [@ac\_sch](https://discourse.julialang.org/u/ac_sch)\
**Replies:** 3\
**Last updated:** [August 22, 2026, 9:58am UTC](https://discourse.julialang.org/t/ann-sparlectra-jl-v0-8-2-transparent-ac-power-flow-and-state-estimation/137349 "2026-08-22T09:58:57Z")

</div>

\[ANN\] Sparlectra.jl – transparent AC power-flow and state estimation in Julia Hi everyone, I’d like to announce Sparlectra.jl, a Julia package for transparent power-system calculations, now at v0.8.2. I originally deve…

---

## [Should Julia have rsqrt? And e.g. support RSQRTSS](https://discourse.julialang.org/t/should-julia-have-rsqrt-and-e-g-support-rsqrtss/125969)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 16\
**Last updated:** [May 26, 2026, 7:00pm UTC](https://discourse.julialang.org/t/should-julia-have-rsqrt-and-e-g-support-rsqrtss/125969 "2026-05-26T19:00:05Z")

</div>

Neither Python (Numpy) nor C++ have rsqrt, but pytorch and tensorflow have it (I didn’t confirm in Flux.jl or Lux.jl or look carefully, though CUDA.jl/Nvidia and JavaScript stdlib have for single and double, and AMD/HIP …

---

## [Floating-point accuracy visualization example: the ULP error for each math function coming with Julia](https://discourse.julialang.org/t/floating-point-accuracy-visualization-example-the-ulp-error-for-each-math-function-coming-with-julia/135392)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 20\
**Last updated:** [February 6, 2026, 2:25pm UTC](https://discourse.julialang.org/t/floating-point-accuracy-visualization-example-the-ulp-error-for-each-math-function-coming-with-julia/135392 "2026-02-06T14:25:29Z")

</div>

Introduction The implementation of a math function, such as cos(::Float64) in Julia, should be fast, but also needs to be at least somewhat accurate. Here I propose a method for visualizing empirical accuracy data. Cons…

---

## [Numeric stability of Base.exp of static matrix of Float32](https://discourse.julialang.org/t/numeric-stability-of-base-exp-of-static-matrix-of-float32/133389)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 12\
**Last updated:** [October 26, 2025, 7:46pm UTC](https://discourse.julialang.org/t/numeric-stability-of-base-exp-of-static-matrix-of-float32/133389 "2025-10-26T19:46:53Z")

</div>

Guys, I want to use Base.exp in my model which uses Float32 with StaticArray and StaticVector. However, I found there is a numerical instability of Base.exp with the 3\*3 matrix…see the example above: using StaticArrays…

---

## [Solving a non-linear P(I)DE - age-structured equation](https://discourse.julialang.org/t/solving-a-non-linear-p-i-de-age-structured-equation/132677)

<div class="topic-metadata">

**Author:** [@jucheval](https://discourse.julialang.org/u/jucheval)\
**Replies:** 5\
**Last updated:** [September 29, 2025, 8:51am UTC](https://discourse.julialang.org/t/solving-a-non-linear-p-i-de-age-structured-equation/132677 "2025-09-29T08:51:02Z")

</div>

Hi everyone ! I am searching for some way to solve the following non-linear P(I)DE, known as the refractory density equation or age-structured equation: \\begin{cases} \\frac{\\partial}{\\partial\_t} u(t,a) + \\frac{\\pa…

---

## [Root finding for (possibly) complex valued functions with Nonlinearsolve.jl](https://discourse.julialang.org/t/root-finding-for-possibly-complex-valued-functions-with-nonlinearsolve-jl/97784)

<div class="topic-metadata">

**Author:** [@theplatters](https://discourse.julialang.org/u/theplatters)\
**Replies:** 5\
**Last updated:** [September 4, 2025, 3:49pm UTC](https://discourse.julialang.org/t/root-finding-for-possibly-complex-valued-functions-with-nonlinearsolve-jl/97784 "2025-09-04T15:49:08Z")

</div>

Hello. I need to translate some matlab code into Julia, where i need to find the roots in X of the function: function problem(X :: AbstractVector{T}, A, β, Ω, α, ε, θ, σ,L) where T N = length(α) p = @view X\[1:…

---

## [Different results when using 1 and 1.0 in expression](https://discourse.julialang.org/t/different-results-when-using-1-and-1-0-in-expression/131617)

<div class="topic-metadata">

**Author:** [@jogama](https://discourse.julialang.org/u/jogama)\
**Replies:** 7\
**Last updated:** [August 14, 2025, 9:38pm UTC](https://discourse.julialang.org/t/different-results-when-using-1-and-1-0-in-expression/131617 "2025-08-14T21:38:19Z")

</div>

d = (1+0im, 1.0+0im) (sqrt(exp(-d\[1\]) - 1), sqrt(exp(-d\[2\]) - 1)) (0.0 + 0.7950600976206501im, 0.0 - 0.7950600976206501im) also d = (1+0im, 1.0+0im); (sqrt(exp(-d\[1\]) - 1.0), …

---

## [Fastest way to calculate eigenvectors of 4x4 matrix](https://discourse.julialang.org/t/fastest-way-to-calculate-eigenvectors-of-4x4-matrix/125174)

<div class="topic-metadata">

**Author:** [@Xu\_Shan](https://discourse.julialang.org/u/Xu_Shan)\
**Replies:** 21\
**Last updated:** [July 13, 2025, 2:06pm UTC](https://discourse.julialang.org/t/fastest-way-to-calculate-eigenvectors-of-4x4-matrix/125174 "2025-07-13T14:06:05Z")

</div>

Hi guys, I am trying to run a model which simulates a long time series. For each time step, I need to solve the Eigen values and Eigen vectors for one matrix. This matrix is only 4\*4, but the computation time is importa…

---

## [Huge performance variance with \`if\` options in loops](https://discourse.julialang.org/t/huge-performance-variance-with-if-options-in-loops/130462)

<div class="topic-metadata">

**Author:** [@hz-xiaxz](https://discourse.julialang.org/u/hz-xiaxz)\
**Replies:** 4\
**Last updated:** [July 4, 2025, 6:51am UTC](https://discourse.julialang.org/t/huge-performance-variance-with-if-options-in-loops/130462 "2025-07-04T06:51:35Z")

</div>

I’m trying to optimize a non-allocating matrix update. Here is the simple code. function update\_W\_original!( W::AbstractMatrix, l::Int, K::Int, col\_cache::AbstractVector, row\_cache::AbstractVector, )…

---

## [\[ANN\] TypedMatrices.jl v1.2.0 - Package for Numerical Computation: Enhanced Matrix Search, Properties, Group Management, and Usability](https://discourse.julialang.org/t/ann-typedmatrices-jl-v1-2-0-package-for-numerical-computation-enhanced-matrix-search-properties-group-management-and-usability/128996)

<div class="topic-metadata">

**Author:** [@Andy\_Zhang](https://discourse.julialang.org/u/Andy_Zhang)\
**Replies:** 0\
**Last updated:** [May 14, 2025, 1:34pm UTC](https://discourse.julialang.org/t/ann-typedmatrices-jl-v1-2-0-package-for-numerical-computation-enhanced-matrix-search-properties-group-management-and-usability/128996 "2025-05-14T13:34:21Z")

</div>

Hi everyone, I’m happy to announce the release of TypedMatrices.jl v1.2.0! :tada: This version marks a feature-complete and stable milestone, ready for use in research, teaching, and numerical software development. Ov…

---

## [ArbNumerics.jl library update](https://discourse.julialang.org/t/arbnumerics-jl-library-update/128591)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 3\
**Last updated:** [May 4, 2025, 6:43pm UTC](https://discourse.julialang.org/t/arbnumerics-jl-library-update/128591 "2025-05-04T18:43:16Z")

</div>

Version 1.6 of ArbNumerics.jl is released. This release uses the latest arb C library, which is now encapsulated into FLINT3 (see Real and complex numbers (Arb) : detailed table of contents — FLINT 3.3.0-dev documentatio…

---

## [Is @fastmath less accurate on M-series macs?](https://discourse.julialang.org/t/is-fastmath-less-accurate-on-m-series-macs/124875)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 7\
**Last updated:** [January 17, 2025, 2:31pm UTC](https://discourse.julialang.org/t/is-fastmath-less-accurate-on-m-series-macs/124875 "2025-01-17T14:31:09Z")

</div>

I have a repo where the CI fails for macOS-latest but succeeds for windows-latest and ubuntu-lastest. The failed tests are accuracy tests. I have yet to write up an isolated minimal working example. Has anyone encountere…

---

## [How to compute TanhExp / TeLU function accurately?](https://discourse.julialang.org/t/how-to-compute-tanhexp-telu-function-accurately/124464)

<div class="topic-metadata">

**Author:** [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Replies:** 10\
**Last updated:** [January 6, 2025, 5:07pm UTC](https://discourse.julialang.org/t/how-to-compute-tanhexp-telu-function-accurately/124464 "2025-01-06T17:07:34Z")

</div>

A new paper advocates using the TeLU activation function, x \\cdot \\tanh (e^x), for neural networks, also proposed in this paper under the name TanhExp. The intermediate result e^x grows very fast for large x, even thoug…

---

## [Compute integral for DelaunayTriangulation.jl to be able to solve PDE with FiniteVolumeMethod.jl](https://discourse.julialang.org/t/compute-integral-for-delaunaytriangulation-jl-to-be-able-to-solve-pde-with-finitevolumemethod-jl/124310)

<div class="topic-metadata">

**Author:** [@B4rtel](https://discourse.julialang.org/u/B4rtel)\
**Replies:** 4\
**Last updated:** [January 2, 2025, 3:20pm UTC](https://discourse.julialang.org/t/compute-integral-for-delaunaytriangulation-jl-to-be-able-to-solve-pde-with-finitevolumemethod-jl/124310 "2025-01-02T15:20:13Z")

</div>

Hi :), I would like to solve a advection PDE of the form \\frac{\\partial}{\\partial t} f(x,t) = - \\nabla\_x \\cdot \\left(\\left(\\int \[\\phi(p\_1(x,y),\\phi(p\_2(x,y)\]\\odot (y-x) f(y,t) \\text{d} y\\right) f(x,t)\\right) for p\_a(x\_i…

---

## [Evalpoly without coefficients: ugly errors, zero polynomial?](https://discourse.julialang.org/t/evalpoly-without-coefficients-ugly-errors-zero-polynomial/97666)

<div class="topic-metadata">

**Author:** [@nsajko](https://discourse.julialang.org/u/nsajko)\
**Replies:** 1\
**Last updated:** [November 28, 2024, 11:56am UTC](https://discourse.julialang.org/t/evalpoly-without-coefficients-ugly-errors-zero-polynomial/97666 "2024-11-28T11:56:30Z")

</div>

Consider calls such as these: julia\> evalpoly(3, ()) ERROR: BoundsError: attempt to access Tuple{} at index \[0\] Stacktrace: \[1\] getindex(t::Tuple, i::Int64) @ Base ./tuple.jl:31 \[2\] macro expansion @ ./math.jl:1…

---

## [Best way to use/implement Debye function in Julia?](https://discourse.julialang.org/t/best-way-to-use-implement-debye-function-in-julia/111090)

<div class="topic-metadata">

**Author:** [@trg818](https://discourse.julialang.org/u/trg818)\
**Replies:** 29\
**Last updated:** [November 18, 2024, 8:56pm UTC](https://discourse.julialang.org/t/best-way-to-use-implement-debye-function-in-julia/111090 "2024-11-18T20:56:46Z")

</div>

I need the 3rd-order Debye function in a Julia routine and wonder which is the best way to use/implement it. Searching for it in different repositories, I found various implementations, some of which based on simply sol…

---

## [Cholesky Decomposition of a Sparse Symmetric Positive Semidefinite (SPSD) Singular Matrix](https://discourse.julialang.org/t/cholesky-decomposition-of-a-sparse-symmetric-positive-semidefinite-spsd-singular-matrix/119682)

<div class="topic-metadata">

**Author:** [@RoyiAvital](https://discourse.julialang.org/u/RoyiAvital)\
**Replies:** 19\
**Last updated:** [September 23, 2024, 5:31pm UTC](https://discourse.julialang.org/t/cholesky-decomposition-of-a-sparse-symmetric-positive-semidefinite-spsd-singular-matrix/119682 "2024-09-23T17:31:44Z")

</div>

Is there such equivalent for sparse matrix? I don’t see the pivoting option for SparseMatrixCSC. How would you handle a Sparse SPSD matrix? Currently I just use check = false. Probably small shift should help but i…

---

## [Cholesky decomposition of low-rank positive-semidefinite matrix](https://discourse.julialang.org/t/cholesky-decomposition-of-low-rank-positive-semidefinite-matrix/70397)

<div class="topic-metadata">

**Author:** [@Shuvomoy\_Das\_Gupta](https://discourse.julialang.org/u/Shuvomoy_Das_Gupta)\
**Replies:** 3\
**Last updated:** [October 26, 2021, 12:54pm UTC](https://discourse.julialang.org/t/cholesky-decomposition-of-low-rank-positive-semidefinite-matrix/70397 "2021-10-26T12:54:43Z")

</div>

Dear All, I have a rank r positive-semidefinite matrix M, which I am trying to decompose via lower-triangularlar Cholesky factorization M=LL^\\top, but I am particularly interested in computing an L that has r positive d…

---

## [History of \`isapprox\` in languages](https://discourse.julialang.org/t/history-of-isapprox-in-languages/119347)

<div class="topic-metadata">

**Author:** [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Replies:** 56\
**Last updated:** [September 19, 2024, 8:58pm UTC](https://discourse.julialang.org/t/history-of-isapprox-in-languages/119347 "2024-09-19T20:58:20Z")

</div>

Does anyone know why the de-facto standard definition of isapprox intentionally fails when one of the arguments is zero? isapprox(0.0, 0.0 + 1e-10) # false isapprox(1.0, 1.0 + 1e-10) # true It is clear from the formula…

---

## [Implicit numerical method using NLsolve.jl](https://discourse.julialang.org/t/implicit-numerical-method-using-nlsolve-jl/118525)

<div class="topic-metadata">

**Author:** [@khaledharizb](https://discourse.julialang.org/u/khaledharizb)\
**Replies:** 3\
**Last updated:** [August 23, 2024, 11:13am UTC](https://discourse.julialang.org/t/implicit-numerical-method-using-nlsolve-jl/118525 "2024-08-23T11:13:33Z")

</div>

I would like to implement Lobatto IIIA-IIIB which is an implicit method. To do so, a non-linear equations need to be solved. Then I used NLsolve.jl for my problem using NLsolve function NuMethod(fV::Function,fT::Func…

---

## [FiniteVolumeMethod.jl v1.0: Solving conservation PDEs in 2D, now with systems and internal conditions](https://discourse.julialang.org/t/finitevolumemethod-jl-v1-0-solving-conservation-pdes-in-2d-now-with-systems-and-internal-conditions/103715)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 5\
**Last updated:** [May 11, 2024, 10:56am UTC](https://discourse.julialang.org/t/finitevolumemethod-jl-v1-0-solving-conservation-pdes-in-2d-now-with-systems-and-internal-conditions/103715 "2024-05-11T10:56:15Z")

</div>

I have just released v1.0 of my FiniteVolumeMethod.jl package, which is a package for solving PDEs of the form \\frac{\\partial u(\\boldsymbol x, t)}{\\partial t} + \\boldsymbol\\nabla\\boldsymbol\\cdot\\boldsymbol q(\\boldsymbo…

---

## [\[RFC\] What should the arithmetic within the FixedPointNumbers be](https://discourse.julialang.org/t/rfc-what-should-the-arithmetic-within-the-fixedpointnumbers-be/46697)

<div class="topic-metadata">

**Author:** [@kimikage](https://discourse.julialang.org/u/kimikage)\
**Replies:** 65\
**Last updated:** [May 11, 2024, 4:54am UTC](https://discourse.julialang.org/t/rfc-what-should-the-arithmetic-within-the-fixedpointnumbers-be/46697 "2024-05-11T04:54:12Z")

</div>

Hi all, I am one of the committers of FixedPointNumbers.jl and we are currently working on the next version, v0.9.0, to be released. This is not directly related to the visualization, but I’m writing this in the visual…

---

## [StackOverflowError for large set of Jumps in JumpProcesses.jl with high-dimensional set of ODEs](https://discourse.julialang.org/t/stackoverflowerror-for-large-set-of-jumps-in-jumpprocesses-jl-with-high-dimensional-set-of-odes/112969)

<div class="topic-metadata">

**Author:** [@flmuk](https://discourse.julialang.org/u/flmuk)\
**Replies:** 1\
**Last updated:** [April 15, 2024, 4:16pm UTC](https://discourse.julialang.org/t/stackoverflowerror-for-large-set-of-jumps-in-jumpprocesses-jl-with-high-dimensional-set-of-odes/112969 "2024-04-15T16:16:41Z")

</div>

Hello, I have to simulate a large (n=1000) set of simple ODEs, and each ODE gets an independent realisation of Poisson input. When trying to set up the JumpProblem as in the documentation. However, when the number of …

---

## [DiscreteCallback takes a break: discrete callback shows counterintuitive behaviour in DifferentialEquations.jl](https://discourse.julialang.org/t/discretecallback-takes-a-break-discrete-callback-shows-counterintuitive-behaviour-in-differentialequations-jl/112768)

<div class="topic-metadata">

**Author:** [@flmuk](https://discourse.julialang.org/u/flmuk)\
**Replies:** 2\
**Last updated:** [April 11, 2024, 3:36pm UTC](https://discourse.julialang.org/t/discretecallback-takes-a-break-discrete-callback-shows-counterintuitive-behaviour-in-differentialequations-jl/112768 "2024-04-11T15:36:34Z")

</div>

Hello, I have a question about the behaviour of callbacks using DifferentialEquations.jl, because I find the behaviour of DiscreteCallbacks counterintuitive. Consider the following code, i.e. an adaptation of this: us…

---

## [Optimising superbee! function](https://discourse.julialang.org/t/optimising-superbee-function/112568)

<div class="topic-metadata">

**Author:** [@alemelis](https://discourse.julialang.org/u/alemelis)\
**Replies:** 20\
**Last updated:** [April 5, 2024, 4:40pm UTC](https://discourse.julialang.org/t/optimising-superbee-function/112568 "2024-04-05T16:40:55Z")

</div>

Hello, I’m profiling my simulation with profview and this is the flame graph where I’m pointing to the four function calls that seem to be among the most expensive. Those are calling the same function – superbee! – i…

---

## [\[ANN\] MultiPrecisionArrays.jl: Algorithms and data structures for iterative refinement](https://discourse.julialang.org/t/ann-multiprecisionarrays-jl-algorithms-and-data-structures-for-iterative-refinement/111993)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 0\
**Last updated:** [March 22, 2024, 8:35pm UTC](https://discourse.julialang.org/t/ann-multiprecisionarrays-jl-algorithms-and-data-structures-for-iterative-refinement/111993 "2024-03-22T20:35:35Z")

</div>

I just tagged v0.1.0 of MultiPrecisionArrays.jl. This package provides data structures and solvers for several variants of iterative refinement (IR) for solving linear systems A x= b. IR reduces matrix factorization c…

---

## [\[ANN\] SIAMFANLEquations.jl v1.0 Publication release](https://discourse.julialang.org/t/ann-siamfanlequations-jl-v1-0-publication-release/86946)

<div class="topic-metadata">

**Author:** [@ctkelley](https://discourse.julialang.org/u/ctkelley)\
**Replies:** 6\
**Last updated:** [January 8, 2024, 10:18pm UTC](https://discourse.julialang.org/t/ann-siamfanlequations-jl-v1-0-publication-release/86946 "2024-01-08T22:18:55Z")

</div>

La commedia è finita! This project is Done. I’ve just released v1.0, the final publication version, of SIAMFANLEquations.jl. This is a suite of nonlinear solvers, test problems, and examples. The solvers are Newton an…

---

## [Solving system of ODE for updating initial conditions](https://discourse.julialang.org/t/solving-system-of-ode-for-updating-initial-conditions/107784)

<div class="topic-metadata">

**Author:** [@acubed](https://discourse.julialang.org/u/acubed)\
**Replies:** 7\
**Last updated:** [December 19, 2023, 2:38pm UTC](https://discourse.julialang.org/t/solving-system-of-ode-for-updating-initial-conditions/107784 "2023-12-19T14:38:07Z")

</div>

I am dealing with the following task. I have system of 2nd order ODE which depend on parameter K. I solve this system using DifferentialEquations on time interval \[0,t\_0\], where the value t\_0 is defined. I define tspan a…

---

## [Ferrite 2D problem unphysical results](https://discourse.julialang.org/t/ferrite-2d-problem-unphysical-results/107037)

<div class="topic-metadata">

**Author:** [@c\_sell](https://discourse.julialang.org/u/c_sell)\
**Replies:** 2\
**Last updated:** [December 13, 2023, 2:21pm UTC](https://discourse.julialang.org/t/ferrite-2d-problem-unphysical-results/107037 "2023-12-13T14:21:47Z")

</div>

Hello, I am using the latest version of Ferrite (Ferrite v0.3.14). I’ve simplified my problem to a small 2D rectangular structure (height = 1; width = 2). The left side is clamped, and on the right-hand side, there is s…

[Next page](https://discourse.julialang.org/tag/numerics/295.md?match_all_tags=true&page=1&tags%5B%5D=numerics)
