# Numerics

**URL:** https://discourse.julialang.org/c/domain/numerics/20.md?page=18

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

**Page:** 19

---

## [2D FFT convolution but get inaccurate results](https://discourse.julialang.org/t/2d-fft-convolution-but-get-inaccurate-results/87816)

<div class="topic-metadata">

**Author:** [@maphdze](https://discourse.julialang.org/u/maphdze)\
**Replies:** 9\
**Last updated:** [September 27, 2022, 12:38pm UTC](https://discourse.julialang.org/t/2d-fft-convolution-but-get-inaccurate-results/87816 "2022-09-27T12:38:07Z")

</div>

I am trying to calculate this convlution integral a(x)=\\int{\\varphi(x,x\\prime)}w(x\\prime)\\rm{d}\\it{V\\prime},where \\varphi(x,x\\prime) is a compact support kernel function with a radius \\ell. Currently, \\varphi(x,x\\prime) …

---

## [Methods for simultaneous diagonalization?](https://discourse.julialang.org/t/methods-for-simultaneous-diagonalization/87840)

<div class="topic-metadata">

**Author:** [@kharing](https://discourse.julialang.org/u/kharing)\
**Replies:** 1\
**Last updated:** [September 26, 2022, 9:19pm UTC](https://discourse.julialang.org/t/methods-for-simultaneous-diagonalization/87840 "2022-09-26T21:19:02Z")

</div>

I have two matrices that commute (within machine precision), both of which have eigenvalues that may be either degenerate or very closely spaced. Is there an existing implementation of a simultaneous diagonalization rout…

---

## [References and implementation for safe/hybrid univariate Newton's method](https://discourse.julialang.org/t/references-and-implementation-for-safe-hybrid-univariate-newtons-method/87638)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 14\
**Last updated:** [September 26, 2022, 9:58am UTC](https://discourse.julialang.org/t/references-and-implementation-for-safe-hybrid-univariate-newtons-method/87638 "2022-09-26T09:58:34Z")

</div>

There exist variants of Newton’s method with safeguards against non-convergence (escape bracket, not converging “fast enough”, etc, in which case they switch to a bracketing method like Brent’s or bisection). Various imp…

---

## [RFC: Compressed (base-6) floating point, taking 1/8 the space (new plan 1/64 compression for neural networks)](https://discourse.julialang.org/t/rfc-compressed-base-6-floating-point-taking-1-8-the-space-new-plan-1-64-compression-for-neural-networks/87289)

<div class="topic-metadata">

**Author:** [@Palli](https://discourse.julialang.org/u/Palli)\
**Replies:** 15\
**Last updated:** [September 25, 2022, 7:16pm UTC](https://discourse.julialang.org/t/rfc-compressed-base-6-floating-point-taking-1-8-the-space-new-plan-1-64-compression-for-neural-networks/87289 "2022-09-25T19:16:49Z")

</div>

I’ll likely be making a package later, but this may already be useful for someone. I though about posting under performance category, but so far decided against, since I’m not (yet) asking for tuning advice, but this wou…

---

## [Using modelling toolkitize to generate sparse jacobian - error](https://discourse.julialang.org/t/using-modelling-toolkitize-to-generate-sparse-jacobian-error/87633)

<div class="topic-metadata">

**Author:** [@hbooth](https://discourse.julialang.org/u/hbooth)\
**Replies:** 0\
**Last updated:** [September 22, 2022, 10:01am UTC](https://discourse.julialang.org/t/using-modelling-toolkitize-to-generate-sparse-jacobian-error/87633 "2022-09-22T10:01:00Z")

</div>

Hi everyone, I am trying to use modelingtoolkitize to regenerate an ODEProblem with the analytical solution to the sparse Jacobian , as in this tutorial: Automated Sparse Analytical Jacobians · ModelingToolkit.jl I am m…

---

## [Preparing tutorials and books](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298)

<div class="topic-metadata">

**Author:** [@vector](https://discourse.julialang.org/u/vector)\
**Replies:** 11\
**Last updated:** [September 20, 2022, 7:12pm UTC](https://discourse.julialang.org/t/preparing-tutorials-and-books/59298 "2022-09-20T19:12:45Z")

</div>

Hi. I am not sure whther this is the right category for posting my query. I cannot find the appropriate category. What software or platform do you use for writing Julia languge tutorials and books? Is it the good old …

---

## [Help to adapt the resolution of an ODE in Matlab to Julia](https://discourse.julialang.org/t/help-to-adapt-the-resolution-of-an-ode-in-matlab-to-julia/87389)

<div class="topic-metadata">

**Author:** [@lucasmsoares96](https://discourse.julialang.org/u/lucasmsoares96)\
**Replies:** 3\
**Last updated:** [September 17, 2022, 6:41am UTC](https://discourse.julialang.org/t/help-to-adapt-the-resolution-of-an-ode-in-matlab-to-julia/87389 "2022-09-17T06:41:18Z")

</div>

Hello guys. I’m having trouble adapting a Matlab code that resolves a second-order ODE to the Julia equivalent. This is the code in Matlab. It plots a graph with 3 curves: syms y(x); dy = diff(y); edo = diff(y,x,2) == …

---

## [Nonuniform fast Hankel transform](https://discourse.julialang.org/t/nonuniform-fast-hankel-transform/87324)

<div class="topic-metadata">

**Author:** [@jinml](https://discourse.julialang.org/u/jinml)\
**Replies:** 3\
**Last updated:** [September 15, 2022, 7:20pm UTC](https://discourse.julialang.org/t/nonuniform-fast-hankel-transform/87324 "2022-09-15T19:20:28Z")

</div>

Hi, does anyone know about any packages that may be able to compute nonuniform fast Hankel transform of continuous functions? I saw this thread mentioning a few options for Fourier transform, which don’t seem to have wha…

---

## [Automatic bifurcation diagram for a simple model](https://discourse.julialang.org/t/automatic-bifurcation-diagram-for-a-simple-model/87227)

<div class="topic-metadata">

**Author:** [@zmoitier](https://discourse.julialang.org/u/zmoitier)\
**Replies:** 0\
**Last updated:** [September 13, 2022, 5:43pm UTC](https://discourse.julialang.org/t/automatic-bifurcation-diagram-for-a-simple-model/87227 "2022-09-13T17:43:11Z")

</div>

I am trying to compute the bifurcation diagram using BifucationKit.jl associated to the equation: find a vector u and a scalar λ such that Au - λu - u.^3 = 0 where A is a real symmetric matrix. For this problem, the theo…

---

## [How to extract the right-hand side function from a differential equation solution?](https://discourse.julialang.org/t/how-to-extract-the-right-hand-side-function-from-a-differential-equation-solution/86764)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 8\
**Last updated:** [September 8, 2022, 8:26pm UTC](https://discourse.julialang.org/t/how-to-extract-the-right-hand-side-function-from-a-differential-equation-solution/86764 "2022-09-08T20:26:31Z")

</div>

Hey, Basically, I want to extract the right hand side function f from the solution of a differential equation \\dot{x} = f(x). For a minimum working example consider the following julia\> using DifferentialEquations ju…

---

## [Frédéric Goualard found an inexactness in our rand()](https://discourse.julialang.org/t/frederic-goualard-found-an-inexactness-in-our-rand/85274)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 19\
**Last updated:** [September 8, 2022, 11:59am UTC](https://discourse.julialang.org/t/frederic-goualard-found-an-inexactness-in-our-rand/85274 "2022-09-08T11:59:09Z")

</div>

The paper, with analysis and a recommended approach (Julia is not alone) Drawing random floating-point numbers from an interval

---

## [Solving 2D poisson equation in polar coordinates (finite differences)](https://discourse.julialang.org/t/solving-2d-poisson-equation-in-polar-coordinates-finite-differences/74280)

<div class="topic-metadata">

**Author:** [@Aran](https://discourse.julialang.org/u/Aran)\
**Replies:** 19\
**Last updated:** [June 7, 2022, 1:47am UTC](https://discourse.julialang.org/t/solving-2d-poisson-equation-in-polar-coordinates-finite-differences/74280 "2022-06-07T01:47:03Z")

</div>

Hello all, I am looking to solve the following poisson equation \\nabla^2 \\psi = -\\omega \\quad \\text{and} \\quad \\nabla^2 = \\frac{\\partial ^2}{{\\partial \\rho^2 }} + \\frac{1}{\\rho }\\frac{\\partial}{\\partial \\rho} + \\frac{…

---

## [Performance with intermittent singleton dimensions](https://discourse.julialang.org/t/performance-with-intermittent-singleton-dimensions/86374)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 11\
**Last updated:** [September 3, 2022, 12:04pm UTC](https://discourse.julialang.org/t/performance-with-intermittent-singleton-dimensions/86374 "2022-09-03T12:04:00Z")

</div>

Hello performance aficionados. I was testing a bit the copy performance, to see if there may be caching issues with multidimensional array copies and am generally quite impressed. However, I found one case that may lead…

---

## [Arithmetic with a specified (low) number of digits](https://discourse.julialang.org/t/arithmetic-with-a-specified-low-number-of-digits/86713)

<div class="topic-metadata">

**Author:** [@DanielVandH](https://discourse.julialang.org/u/DanielVandH)\
**Replies:** 1\
**Last updated:** [September 3, 2022, 1:12am UTC](https://discourse.julialang.org/t/arithmetic-with-a-specified-low-number-of-digits/86713 "2022-09-03T01:12:22Z")

</div>

Is it possible to perform computations using, say, five-digit arithmetic with a given rounding mode? For example, can I easily compute x/10^{-5}, x = 0.44446, in 5-digit arithmetic with rounding to the nearest number? I …

---

## [Good solver for nonlinear diffusion PDE with source?](https://discourse.julialang.org/t/good-solver-for-nonlinear-diffusion-pde-with-source/86587)

<div class="topic-metadata">

**Author:** [@JordiBolibar](https://discourse.julialang.org/u/JordiBolibar)\
**Replies:** 1\
**Last updated:** [August 31, 2022, 1:45pm UTC](https://discourse.julialang.org/t/good-solver-for-nonlinear-diffusion-pde-with-source/86587 "2022-08-31T13:45:37Z")

</div>

With @facusapienza we’re trying to find a good solver to solve a 2D nonlinear ice flow PDE with mass addition and subtraction (i.e. heat equation with source). We are encountering a big difference in solving it with and …

---

## [LinearSolve and SparseArrays: reuse factorization for multiple right-hand side vectors?](https://discourse.julialang.org/t/linearsolve-and-sparsearrays-reuse-factorization-for-multiple-right-hand-side-vectors/85003)

<div class="topic-metadata">

**Author:** [@afas](https://discourse.julialang.org/u/afas)\
**Replies:** 2\
**Last updated:** [August 29, 2022, 1:15am UTC](https://discourse.julialang.org/t/linearsolve-and-sparsearrays-reuse-factorization-for-multiple-right-hand-side-vectors/85003 "2022-08-29T01:15:51Z")

</div>

Hi everyone, I am implementing several Finite Element procedures in Julia and I am trying to switch all the implementation to use LinearSolve. I would like to know if it is possible to reuse a symbolic factorization of …

---

## [BigFloat converted to string returns different number?](https://discourse.julialang.org/t/bigfloat-converted-to-string-returns-different-number/86473)

<div class="topic-metadata">

**Author:** [@HelloThere](https://discourse.julialang.org/u/HelloThere)\
**Replies:** 8\
**Last updated:** [August 28, 2022, 11:20pm UTC](https://discourse.julialang.org/t/bigfloat-converted-to-string-returns-different-number/86473 "2022-08-28T23:20:47Z")

</div>

Hi, I am new to Julia and in the documentation I came across this: julia\> big"1.23456789012345678901" 1.234567890123456789010000000000000000000000000000000000000000000000000000000004 At first I thought that this is so…

---

## [@btime of cis Function slower than writing it again](https://discourse.julialang.org/t/btime-of-cis-function-slower-than-writing-it-again/86318)

<div class="topic-metadata">

**Author:** [@RainerHeintzmann](https://discourse.julialang.org/u/RainerHeintzmann)\
**Replies:** 2\
**Last updated:** [August 25, 2022, 1:13pm UTC](https://discourse.julialang.org/t/btime-of-cis-function-slower-than-writing-it-again/86318 "2022-08-25T13:13:35Z")

</div>

I found a quite strange effect when evaluating the performance of cis via @btime: sz = (2000,2000) a = Float32.(2pi .\* rand(sz...)); function cis\_fast(phi::T) where {T\<:Real} complex(sincos(T(pi/2) .- phi)...) end …

---

## [Threads not working in julia 1.8.0](https://discourse.julialang.org/t/threads-not-working-in-julia-1-8-0/86083)

<div class="topic-metadata">

**Author:** [@mastrof](https://discourse.julialang.org/u/mastrof)\
**Replies:** 6\
**Last updated:** [August 22, 2022, 7:33pm UTC](https://discourse.julialang.org/t/threads-not-working-in-julia-1-8-0/86083 "2022-08-22T19:33:57Z")

</div>

Just updated to 1.8.0 on my laptop and found out multithreading is not working as expected: loops never leave master thread The basic example code behaves differently on 1.8.0 compared to my 1.6.2 installation a = zero…

---

## [Julia DynamicalSystems package for calculating Recurrence Matrices](https://discourse.julialang.org/t/julia-dynamicalsystems-package-for-calculating-recurrence-matrices/85964)

<div class="topic-metadata">

**Author:** [@Zahra](https://discourse.julialang.org/u/Zahra)\
**Replies:** 1\
**Last updated:** [August 22, 2022, 1:23pm UTC](https://discourse.julialang.org/t/julia-dynamicalsystems-package-for-calculating-recurrence-matrices/85964 "2022-08-22T13:23:52Z")

</div>

I don’t understand what Julia’s “RecurrenceMatrices” is doing. I give a vector of two float numbers \[1.041; 1.066\] as the input, and I set “epsilon = 0.01”, and in the output, it says that these two nodes are near. Am I …

---

## [Building on OrdinaryDiffEq.jl vs DiffEqBase.jl](https://discourse.julialang.org/t/building-on-ordinarydiffeq-jl-vs-diffeqbase-jl/85620)

<div class="topic-metadata">

**Author:** [@nathanaelbosch](https://discourse.julialang.org/u/nathanaelbosch)\
**Replies:** 3\
**Last updated:** [August 20, 2022, 11:36am UTC](https://discourse.julialang.org/t/building-on-ordinarydiffeq-jl-vs-diffeqbase-jl/85620 "2022-08-20T11:36:59Z")

</div>

Hi everyone, I am curious about the best approach for implementing custom ODE solvers in the DifferentialEquations.jl ecosystem. As far as I know, there are mostly two options: Contributing to OrdinaryDiffEq.jl: Wh…

---

## [Time it takes to multiply two floats](https://discourse.julialang.org/t/time-it-takes-to-multiply-two-floats/85933)

<div class="topic-metadata">

**Author:** [@JUAN\_CARLOS\_GALVIS\_A](https://discourse.julialang.org/u/JUAN_CARLOS_GALVIS_A)\
**Replies:** 2\
**Last updated:** [August 18, 2022, 6:09pm UTC](https://discourse.julialang.org/t/time-it-takes-to-multiply-two-floats/85933 "2022-08-18T18:09:31Z")

</div>

When i benchmark the multiplication of two Float16, compared to the multiplication of two Float64, it seems it takes the same time. Is this right?

---

## [Create a function of derivatives in Symbolics.jl](https://discourse.julialang.org/t/create-a-function-of-derivatives-in-symbolics-jl/85808)

<div class="topic-metadata">

**Author:** [@Albert\_Zevelev](https://discourse.julialang.org/u/Albert_Zevelev)\
**Replies:** 5\
**Last updated:** [August 17, 2022, 1:20pm UTC](https://discourse.julialang.org/t/create-a-function-of-derivatives-in-symbolics-jl/85808 "2022-08-17T13:20:21Z")

</div>

I have a function f(x,u;p) where x, u are both vectors of variables and p is a vector of parameters. I would like to create a new function f\_{x}(x,u;p) = \\frac{\\partial f}{ \\partial x} and f\_{xu}(x,u;p) = \\frac{\\partial…

---

## [Best way to take derivatives of unevenly spaced data (with interpolations? discrete derivatives?)](https://discourse.julialang.org/t/best-way-to-take-derivatives-of-unevenly-spaced-data-with-interpolations-discrete-derivatives/54097)

<div class="topic-metadata">

**Author:** [@CosmoProf](https://discourse.julialang.org/u/CosmoProf)\
**Replies:** 37\
**Last updated:** [April 30, 2021, 12:44pm UTC](https://discourse.julialang.org/t/best-way-to-take-derivatives-of-unevenly-spaced-data-with-interpolations-discrete-derivatives/54097 "2021-04-30T12:44:34Z")

</div>

Hi, I have a function f(t), where f is numerically sampled at discrete points in time t that are NOT evenly sampled in time. (This is unavoidable.) I need to take the first and second derivatives of f(t), compute a comp…

---

## [Implementing the tensor algebra functor](https://discourse.julialang.org/t/implementing-the-tensor-algebra-functor/64433)

<div class="topic-metadata">

**Author:** [@choquet](https://discourse.julialang.org/u/choquet)\
**Replies:** 0\
**Last updated:** [July 10, 2021, 5:32pm UTC](https://discourse.julialang.org/t/implementing-the-tensor-algebra-functor/64433 "2021-07-10T17:32:28Z")

</div>

I’m trying to implement the free tensor algebra functor T: given a vector space V it creates another vector space T(V). This vector space T(V) has many nice properties, for example, T(V) is not just a vector space but al…

---

## [Q: FiniteDifferences | gradient of a 3D scalar array](https://discourse.julialang.org/t/q-finitedifferences-gradient-of-a-3d-scalar-array/64065)

<div class="topic-metadata">

**Author:** [@Audrius-St](https://discourse.julialang.org/u/Audrius-St)\
**Replies:** 5\
**Last updated:** [August 13, 2022, 2:05am UTC](https://discourse.julialang.org/t/q-finitedifferences-gradient-of-a-3d-scalar-array/64065 "2022-08-13T02:05:53Z")

</div>

Hello, I have a 3D array consisting of numerical scalar values: imgVlm::Array{Float64, 3} The grid spacing along each axis is uniform, but the spacing values are different for each axis. FiniteDifferences seems to be…

---

## [How do I do a fast cumulative integration](https://discourse.julialang.org/t/how-do-i-do-a-fast-cumulative-integration/85574)

<div class="topic-metadata">

**Author:** [@owiecc](https://discourse.julialang.org/u/owiecc)\
**Replies:** 8\
**Last updated:** [August 11, 2022, 1:14pm UTC](https://discourse.julialang.org/t/how-do-i-do-a-fast-cumulative-integration/85574 "2022-08-11T13:14:02Z")

</div>

What are my options for a fast cumulative integration? I can use one of many quadrature packages but this does not scale. using QuadGK f = cos x₁ = 0.0 int\_f(x₂) = quadgk(f, x₁, x₂)\[1\] using Plots plot(\[f, int\_f\], xlim…

---

## [Why is it \`Inf\` and not \`inf\` if \`typeof(Inf) == Float64\`](https://discourse.julialang.org/t/why-is-it-inf-and-not-inf-if-typeof-inf-float64/85583)

<div class="topic-metadata">

**Author:** [@davidavdav](https://discourse.julialang.org/u/davidavdav)\
**Replies:** 1\
**Last updated:** [August 10, 2022, 2:22pm UTC](https://discourse.julialang.org/t/why-is-it-inf-and-not-inf-if-typeof-inf-float64/85583 "2022-08-10T14:22:05Z")

</div>

I thought that the Julia style is to have Capitalized words for types and modules. —david

---

## [Changing domain for Fourier](https://discourse.julialang.org/t/changing-domain-for-fourier/85331)

<div class="topic-metadata">

**Author:** [@andreasvarga](https://discourse.julialang.org/u/andreasvarga)\
**Replies:** 5\
**Last updated:** [August 9, 2022, 5:52am UTC](https://discourse.julialang.org/t/changing-domain-for-fourier/85331 "2022-08-09T05:52:02Z")

</div>

I am using ApproxFun.jl as basis to define and manipulate periodic matrices within the PeridicSystems.jl, a collection of tools dedicated for handling periodic systems. I consider ApproxFun.jl a valuable tool for my purp…

---

## [Numerical integration of vector-valued functions using Julia packages](https://discourse.julialang.org/t/numerical-integration-of-vector-valued-functions-using-julia-packages/85413)

<div class="topic-metadata">

**Author:** [@danrib07](https://discourse.julialang.org/u/danrib07)\
**Replies:** 3\
**Last updated:** [August 6, 2022, 10:26pm UTC](https://discourse.julialang.org/t/numerical-integration-of-vector-valued-functions-using-julia-packages/85413 "2022-08-06T22:26:32Z")

</div>

Hi, I need to compute the following integral \\int\_{0}^{t} e^{At'}b \\,dt' where A is a real-valued matrix of size (m x m), and b is a real-valued column vector of size (m x 1). The current method I have implemented to c…

[Previous page](https://discourse.julialang.org/c/domain/numerics/20.md?page=17)

[Next page](https://discourse.julialang.org/c/domain/numerics/20.md?page=19)
