# Numerics

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

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

**Page:** 39

---

## [Finding Roots with Roots.jl on ODE solutions](https://discourse.julialang.org/t/finding-roots-with-roots-jl-on-ode-solutions/13463)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 6\
**Last updated:** [August 14, 2018, 10:08pm UTC](https://discourse.julialang.org/t/finding-roots-with-roots-jl-on-ode-solutions/13463 "2018-08-14T22:08:03Z")

</div>

I can find roots of an ODE solution nicely in this working, simplified example using DifferentialEquations using Plots using Roots prob = ODEProblem( function(u::Float64,p,t) return -u end, 1.0, (0.0,1.…

---

## [Solving a system of differential equations with DifferentailEqations.jl](https://discourse.julialang.org/t/solving-a-system-of-differential-equations-with-differentaileqations-jl/13406)

<div class="topic-metadata">

**Author:** [@OvidiusCicero](https://discourse.julialang.org/u/OvidiusCicero)\
**Replies:** 2\
**Last updated:** [August 13, 2018, 9:27pm UTC](https://discourse.julialang.org/t/solving-a-system-of-differential-equations-with-differentaileqations-jl/13406 "2018-08-13T21:27:08Z")

</div>

Hello there when I try to solve a system of ordinary differential equations with the following code: using DifferentialEquations function dgl(du,u,p,t) du\[1\] = u\[3\] du\[2\] = u\[4\] du\[3\] = -sqrt(u\[4\]^2+u\[5\]^2)\*u\[3\] d…

---

## [Should ::SVD \\ ::Vector fall back on pinv?](https://discourse.julialang.org/t/should-svd-vector-fall-back-on-pinv/12900)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 4\
**Last updated:** [August 5, 2018, 3:57pm UTC](https://discourse.julialang.org/t/should-svd-vector-fall-back-on-pinv/12900 "2018-08-05T15:57:16Z")

</div>

At the back of my head, I was wrongly assuming that svd(A) \\ b should be falling back on an efficient pinv(A) \* b. For instance I find it surprising that julia\> qr(zeros(3,3), Val(true)) \\ ones(3) 3-element Array{Float6…

---

## [OpenBLAS on master -- getting wrong results with multithreading?](https://discourse.julialang.org/t/openblas-on-master-getting-wrong-results-with-multithreading/12694)

<div class="topic-metadata">

**Author:** [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Replies:** 2\
**Last updated:** [July 28, 2018, 4:16pm UTC](https://discourse.julialang.org/t/openblas-on-master-getting-wrong-results-with-multithreading/12694 "2018-07-28T16:16:31Z")

</div>

I am getting inconsistent results from multiplying the same two matrices together with OpenBLAS on Julia master: julia\> y = randn(400,400); julia\> x = randn(400,400); julia\> cond(x \* y) 3108.7389106095816 julia\> cond…

---

## [Is DifferentialEquations.jl not ready for julia-v0.7.0?](https://discourse.julialang.org/t/is-differentialequations-jl-not-ready-for-julia-v0-7-0/12460)

<div class="topic-metadata">

**Author:** [@zekeriya.sari](https://discourse.julialang.org/u/zekeriya.sari)\
**Replies:** 4\
**Last updated:** [July 21, 2018, 7:30pm UTC](https://discourse.julialang.org/t/is-differentialequations-jl-not-ready-for-julia-v0-7-0/12460 "2018-07-21T19:30:33Z")

</div>

I have been using DifferentialEquations package for a while on julia-v0.6.3. I decided to upgrade julia to julia-v0.7.0-beta2.0. Having done the julia upgrade, I tried to re-install the DifferentialEquations.jl for julia…

---

## [ReverseDiff Incorrect Result](https://discourse.julialang.org/t/reversediff-incorrect-result/12505)

<div class="topic-metadata">

**Author:** [@PaulMatlashewski](https://discourse.julialang.org/u/PaulMatlashewski)\
**Replies:** 5\
**Last updated:** [July 19, 2018, 9:51pm UTC](https://discourse.julialang.org/t/reversediff-incorrect-result/12505 "2018-07-19T21:51:13Z")

</div>

I’m running into an issue using ReverseDiff. It seems to be evaluating my function incorrectly when I prerecord a gradient tape: using ReverseDiff: GradientTape, GradientConfig, gradient!, compile using DiffResults: val…

---

## [How to use PeriodicCallbacks from DiffEqs](https://discourse.julialang.org/t/how-to-use-periodiccallbacks-from-diffeqs/12440)

<div class="topic-metadata">

**Author:** [@SanAlphaTau](https://discourse.julialang.org/u/SanAlphaTau)\
**Replies:** 1\
**Last updated:** [July 17, 2018, 4:56pm UTC](https://discourse.julialang.org/t/how-to-use-periodiccallbacks-from-diffeqs/12440 "2018-07-17T16:56:40Z")

</div>

Hey guys I’m having trouble understanding the documentation of periodic callbacks. Say I have a ODE and want periodically input some number to a value. From reading the documentation I thought periodic callback would do…

---

## [Libflame: Dense linear algebra library with modern design](https://discourse.julialang.org/t/libflame-dense-linear-algebra-library-with-modern-design/12328)

<div class="topic-metadata">

**Author:** [@PetrKryslUCSD](https://discourse.julialang.org/u/PetrKryslUCSD)\
**Replies:** 3\
**Last updated:** [July 12, 2018, 2:46pm UTC](https://discourse.julialang.org/t/libflame-dense-linear-algebra-library-with-modern-design/12328 "2018-07-12T14:46:14Z")

</div>

Has any work been done (or contemplated) on wrapping the libflame dense-matrix linear algebra library in Julia? I know that so far blas is the go-to library, but this newer approach might be a better fit with a modern la…

---

## [Piecewise differential equations](https://discourse.julialang.org/t/piecewise-differential-equations/12187)

<div class="topic-metadata">

**Author:** [@francisco](https://discourse.julialang.org/u/francisco)\
**Replies:** 9\
**Last updated:** [July 6, 2018, 1:52pm UTC](https://discourse.julialang.org/t/piecewise-differential-equations/12187 "2018-07-06T13:52:37Z")

</div>

Hello, I am new at Julia, I would like to solve this system \\frac{dx}{dt} = k1y \\ \\frac{dy}{dt} = k2y+I where k1 and k2 are constant parameters. however, I=0 when y,0 or Ky otherwise, where k is a constant value. I …

---

## [Generalized eigen problem using LinearMap?](https://discourse.julialang.org/t/generalized-eigen-problem-using-linearmap/12168)

<div class="topic-metadata">

**Author:** [@fgerick](https://discourse.julialang.org/u/fgerick)\
**Replies:** 3\
**Last updated:** [July 5, 2018, 6:40am UTC](https://discourse.julialang.org/t/generalized-eigen-problem-using-linearmap/12168 "2018-07-05T06:40:47Z")

</div>

Hello there, I’m trying to solve the generalized eigen problem Ax=\\lambda Bx with A and B being linear maps. However, I encountered a problem when using a shift-invert method (A-\\sigma B)^{-1}Bx=\\frac{1}{\\lambda-\\sigma}…

---

## [Eliminating Diagonal in LowerTriangular](https://discourse.julialang.org/t/eliminating-diagonal-in-lowertriangular/12012)

<div class="topic-metadata">

**Author:** [@avoss3](https://discourse.julialang.org/u/avoss3)\
**Replies:** 5\
**Last updated:** [June 28, 2018, 1:13pm UTC](https://discourse.julialang.org/t/eliminating-diagonal-in-lowertriangular/12012 "2018-06-28T13:13:11Z")

</div>

Does anyone know if it is possible to not include the diagonal when using the LowerTriangular() function or if there is a function that can exclude the diagonal from the output? LowerTriangular() would work perfectly for…

---

## [Refining eigvals, svdvals](https://discourse.julialang.org/t/refining-eigvals-svdvals/12024)

<div class="topic-metadata">

**Author:** [@JeffreySarnoff](https://discourse.julialang.org/u/JeffreySarnoff)\
**Replies:** 12\
**Last updated:** [June 28, 2018, 12:34pm UTC](https://discourse.julialang.org/t/refining-eigvals-svdvals/12024 "2018-06-28T12:34:40Z")

</div>

Out of the box, DoubleFloats work with these LinearAlgebra functions: isdiag, ishermitian, isposdef, issymmetric, istril, istriu norm, det, dot, tr, condskeel, logdet, logabsdet transpose, adjoint, tril, triu diag, diag…

---

## [Type for square matrix](https://discourse.julialang.org/t/type-for-square-matrix/12027)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 1\
**Last updated:** [June 28, 2018, 9:08am UTC](https://discourse.julialang.org/t/type-for-square-matrix/12027 "2018-06-28T09:08:42Z")

</div>

I am wondering if it would make sense to have an abstract type for \<: AbstractMatrix types which are by construction square, eg abstract type SquareMatrix{T} \<: AbstractMatrix{T} end Subtypes would be Diagonal, various…

---

## [@code\_warntype ODEProblem shows \`Any\`](https://discourse.julialang.org/t/code-warntype-odeproblem-shows-any/11839)

<div class="topic-metadata">

**Author:** [@shipengcheng1230](https://discourse.julialang.org/u/shipengcheng1230)\
**Replies:** 1\
**Last updated:** [June 21, 2018, 3:52am UTC](https://discourse.julialang.org/t/code-warntype-odeproblem-shows-any/11839 "2018-06-21T03:52:04Z")

</div>

I tried the example here and see what @code\_warntype returns: julia\> using DifferentialEquations julia\> function lorenz(du,u,p,t) du\[1\] = 10.0\*(u\[2\]-u\[1\]) du\[2\] = u\[1\]\*(28.0-u\[3\]) - u\[2\] du\[3\] =…

---

## [Symmetric Indefinite Solvers (with block diagonal pivoting)](https://discourse.julialang.org/t/symmetric-indefinite-solvers-with-block-diagonal-pivoting/8541)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 6\
**Last updated:** [June 20, 2018, 2:14am UTC](https://discourse.julialang.org/t/symmetric-indefinite-solvers-with-block-diagonal-pivoting/8541 "2018-06-20T02:14:16Z")

</div>

Are there any modules that provide access to (sparse) symmetric indefinite solvers with Bunch-Kaufman-Parlett pivoting where I can access the L and D matrices, or would it be useful to build a module that does this? Righ…

---

## [Way to find positive roots by treating complex numbers as negatives? \[SymEngine + Roots\]](https://discourse.julialang.org/t/way-to-find-positive-roots-by-treating-complex-numbers-as-negatives-symengine-roots/11688)

<div class="topic-metadata">

**Author:** [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Replies:** 14\
**Last updated:** [June 19, 2018, 12:42pm UTC](https://discourse.julialang.org/t/way-to-find-positive-roots-by-treating-complex-numbers-as-negatives-symengine-roots/11688 "2018-06-19T12:42:40Z")

</div>

Let’s say you had some hideous nonlinear equation like so: cur\_equation = -1.0 + 32.5\*(0.237334965250543\*(0.0155717178747169 + 1.42646372678281e-11\*(I\_P^0.96)^6.4516129032258) + 8.02921230974917e-05\*(-(0.210126719741548…

---

## [Table of Automatic Differentiation Examples](https://discourse.julialang.org/t/table-of-automatic-differentiation-examples/11760)

<div class="topic-metadata">

**Author:** [@barak](https://discourse.julialang.org/u/barak)\
**Replies:** 0\
**Last updated:** [June 18, 2018, 3:44pm UTC](https://discourse.julialang.org/t/table-of-automatic-differentiation-examples/11760 "2018-06-18T15:44:18Z")

</div>

We are maintaining a table of AD examples in a variety of languages. There are five example programs, with varying levels of dynamic behaviour and amounts of nesting of AD operators. This has a number of uses. One is ben…

---

## [Convolution quadrature](https://discourse.julialang.org/t/convolution-quadrature/11656)

<div class="topic-metadata">

**Author:** [@DNF](https://discourse.julialang.org/u/DNF)\
**Replies:** 11\
**Last updated:** [June 14, 2018, 12:12am UTC](https://discourse.julialang.org/t/convolution-quadrature/11656 "2018-06-14T00:12:05Z")

</div>

I am looking to perform convolution quadrature, but cannot seem to find any ready-made solution. HCubature.jl and QuadGK.jl seem very capable for ordinary quadrature, but I cannot find any resources for convolution. To …

---

## [Gradiens of gradients using ReverseDiff](https://discourse.julialang.org/t/gradiens-of-gradients-using-reversediff/11661)

<div class="topic-metadata">

**Author:** [@Goysa2](https://discourse.julialang.org/u/Goysa2)\
**Replies:** 0\
**Last updated:** [June 13, 2018, 7:42pm UTC](https://discourse.julialang.org/t/gradiens-of-gradients-using-reversediff/11661 "2018-06-13T19:42:56Z")

</div>

Hi, This is a duplicate of the issue I created here: https://github.com/JuliaDiff/ReverseDiff.jl/issues/105 I am trying to get Hessian-vector product, without having to explicitly compute the Hessian matrix. I have t…

---

## [ReverseDiff resultst do not fit theory](https://discourse.julialang.org/t/reversediff-resultst-do-not-fit-theory/11549)

<div class="topic-metadata">

**Author:** [@Goysa2](https://discourse.julialang.org/u/Goysa2)\
**Replies:** 6\
**Last updated:** [June 8, 2018, 9:21pm UTC](https://discourse.julialang.org/t/reversediff-resultst-do-not-fit-theory/11549 "2018-06-08T21:21:24Z")

</div>

I have a question concerning ReverseDiff. I am doing some simple benchmarking with different Julia tools for automatic differentiation. In theory (at least what I know of automatic differentiation theory) computing a gra…

---

## [Julia equivalent of cupy?](https://discourse.julialang.org/t/julia-equivalent-of-cupy/11603)

<div class="topic-metadata">

**Author:** [@Kaiyin\_Zhong](https://discourse.julialang.org/u/Kaiyin_Zhong)\
**Replies:** 1\
**Last updated:** [June 12, 2018, 12:03pm UTC](https://discourse.julialang.org/t/julia-equivalent-of-cupy/11603 "2018-06-12T12:03:12Z")

</div>

Do we have something like this?

---

## [Solving a simple equation in SymPy.jl fails](https://discourse.julialang.org/t/solving-a-simple-equation-in-sympy-jl-fails/11146)

<div class="topic-metadata">

**Author:** [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Replies:** 4\
**Last updated:** [May 29, 2018, 9:02pm UTC](https://discourse.julialang.org/t/solving-a-simple-equation-in-sympy-jl-fails/11146 "2018-05-29T21:02:54Z")

</div>

Hello, I tried to use SymPy.jl to solve a simple equation, but it fails. It eats more and more memory until the computer stalls. Two questions: a) where can I file a bug report? b) how can I solve this equation in Ju…

---

## [\[ANN\] InverseLaplace.jl](https://discourse.julialang.org/t/ann-inverselaplace-jl/11126)

<div class="topic-metadata">

**Author:** [@jlapeyre](https://discourse.julialang.org/u/jlapeyre)\
**Replies:** 0\
**Last updated:** [May 24, 2018, 12:24pm UTC](https://discourse.julialang.org/t/ann-inverselaplace-jl/11126 "2018-05-24T12:24:47Z")

</div>

InverseLaplace.jl provides a three methods for numerical inversion of Laplace transforms. This has been around for a while. But recently, I cleaned up the documentation and registered the package.

---

## [Times of events with DifferentialEquations.jl](https://discourse.julialang.org/t/times-of-events-with-differentialequations-jl/10811)

<div class="topic-metadata">

**Author:** [@dawbarton](https://discourse.julialang.org/u/dawbarton)\
**Replies:** 5\
**Last updated:** [May 10, 2018, 3:46pm UTC](https://discourse.julialang.org/t/times-of-events-with-differentialequations-jl/10811 "2018-05-10T15:46:46Z")

</div>

I’m using DifferentialEquations.jl for the first time in a while (it’s changed a bit :slight\_smile:) and I’m trying to work out how to get the times at which events happen with a ContinuousCallback function when integrat…

---

## [Cholfact on reshape of view of array](https://discourse.julialang.org/t/cholfact-on-reshape-of-view-of-array/10674)

<div class="topic-metadata">

**Author:** [@lcambier](https://discourse.julialang.org/u/lcambier)\
**Replies:** 2\
**Last updated:** [May 3, 2018, 2:06pm UTC](https://discourse.julialang.org/t/cholfact-on-reshape-of-view-of-array/10674 "2018-05-03T14:06:36Z")

</div>

Hi, I would like to be able to compute the following julia\> A = ones(1000); julia\> B = view(A, 100:199); julia\> C = reshape(B, 10, 10); julia\> F = cholfact!(C) # Obviously this is not SPD :D But I get ERROR: MethodE…

---

## [Very Slow Compilation for Sensitivity Analysis](https://discourse.julialang.org/t/very-slow-compilation-for-sensitivity-analysis/10598)

<div class="topic-metadata">

**Author:** [@ckfinite](https://discourse.julialang.org/u/ckfinite)\
**Replies:** 3\
**Last updated:** [April 28, 2018, 8:01pm UTC](https://discourse.julialang.org/t/very-slow-compilation-for-sensitivity-analysis/10598 "2018-04-28T20:01:20Z")

</div>

I’m working on an application that performs optimization of a complex ODE by iteratively optimizing over the linearized system. The optimization works fine, but sensitivity analysis of the ODE has very strange performanc…

---

## [\`precision\` of a \`BigFloat\` number returning an \`Int32\` on Windows 10](https://discourse.julialang.org/t/precision-of-a-bigfloat-number-returning-an-int32-on-windows-10/10292)

<div class="topic-metadata">

**Author:** [@Kolaru](https://discourse.julialang.org/u/Kolaru)\
**Replies:** 5\
**Last updated:** [April 27, 2018, 12:00am UTC](https://discourse.julialang.org/t/precision-of-a-bigfloat-number-returning-an-int32-on-windows-10/10292 "2018-04-27T00:00:55Z")

</div>

I recently encountered a strange comportment on my machine : julia\> typeof(precision(2.2)) Int64 julia\> typeof(precision(BigFloat(2.2))) Int32 I tried the same code in JuliaBox and there it returns an Int64 both time, …

---

## [Smallest Eigenvalue of a Moler Matrix](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix/10510)

<div class="topic-metadata">

**Author:** [@Hans\_W\_Borchers](https://discourse.julialang.org/u/Hans_W_Borchers)\
**Replies:** 1\
**Last updated:** [April 24, 2018, 5:35pm UTC](https://discourse.julialang.org/t/smallest-eigenvalue-of-a-moler-matrix/10510 "2018-04-24T17:35:38Z")

</div>

For some (strange) reasons I got interested in the smallest eigenvalue of some larger Moler matrices. using MatrixDepot N = 100; A = matrixdepot("moler", 100); D, V = eig(A); D ## -7.60989e-16 2.25006 ... 159.39 439.…

---

## [Support of \`rand(Complex{T})\`](https://discourse.julialang.org/t/support-of-rand-complex-t/10232)

<div class="topic-metadata">

**Author:** [@ExpandingMan](https://discourse.julialang.org/u/ExpandingMan)\
**Replies:** 3\
**Last updated:** [April 8, 2018, 5:37pm UTC](https://discourse.julialang.org/t/support-of-rand-complex-t/10232 "2018-04-08T17:37:40Z")

</div>

I noticed that rand(Complex{Float64}) seems to have support in \\{z ~|~ 0 \\le \\textrm{Re}(z) \\le 1 ~ \\wedge ~ 0 \\le \\textrm{Im}(z) \\le 1\\}. I certainly understand why this happens from a computing perspective (it just ca…

---

## [Quadratic Sieve and NFS factorization in Julia](https://discourse.julialang.org/t/quadratic-sieve-and-nfs-factorization-in-julia/9942)

<div class="topic-metadata">

**Author:** [@Juan](https://discourse.julialang.org/u/Juan)\
**Replies:** 5\
**Last updated:** [March 24, 2018, 5:58pm UTC](https://discourse.julialang.org/t/quadratic-sieve-and-nfs-factorization-in-julia/9942 "2018-03-24T17:58:28Z")

</div>

Hello. What’s the most advanced method used in primes.jl to factorize numbers? I’m looking for implementations of SIQS and NFS in Julia. I’ve only found this basic one of QS: https://github.com/hamukazu/quadratic\_sie…

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

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