# Numerics

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

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

**Page:** 40

---

## [distributed-memory QR / TSQR / linear algebra](https://discourse.julialang.org/t/distributed-memory-qr-tsqr-linear-algebra/9849)

<div class="topic-metadata">

**Author:** [@nychiang](https://discourse.julialang.org/u/nychiang)\
**Replies:** 1\
**Last updated:** [March 20, 2018, 11:39pm UTC](https://discourse.julialang.org/t/distributed-memory-qr-tsqr-linear-algebra/9849 "2018-03-20T23:39:40Z")

</div>

I’m looking for a distributed-memory parallel TSQR (tall and skinny QR) factorization package in Julia. However, it seems that there is no such implementation inside Julia, and what I can do is the following: — use MPI…

---

## [Stepsize control in ODEProblem](https://discourse.julialang.org/t/stepsize-control-in-odeproblem/9772)

<div class="topic-metadata">

**Author:** [@fedxa](https://discourse.julialang.org/u/fedxa)\
**Replies:** 11\
**Last updated:** [March 19, 2018, 1:31am UTC](https://discourse.julialang.org/t/stepsize-control-in-odeproblem/9772 "2018-03-19T01:31:29Z")

</div>

Hello, I have a system of ODE, which is rather heterogeneous. That is one equation corresponds to some background property of a system, and then there are many (say, hundred) equations for individual evolution of compo…

---

## [BigFloat precision issue](https://discourse.julialang.org/t/bigfloat-precision-issue/9786)

<div class="topic-metadata">

**Author:** [@vepiteski](https://discourse.julialang.org/u/vepiteski)\
**Replies:** 4\
**Last updated:** [March 18, 2018, 5:12pm UTC](https://discourse.julialang.org/t/bigfloat-precision-issue/9786 "2018-03-18T17:12:44Z")

</div>

julia\> N=BigFloat(2.0,2048); julia\> S=sqrt(N); julia\> S^2-N -1.727233711018888925077270372560079914223200072887256277004740694033718360632485e-77 julia\> S.prec 256 julia\> N.prec 2048 Why only 256 precision from t…

---

## [Eigenvalues problem in ApproxFun](https://discourse.julialang.org/t/eigenvalues-problem-in-approxfun/580)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 11\
**Last updated:** [March 16, 2018, 6:25pm UTC](https://discourse.julialang.org/t/eigenvalues-problem-in-approxfun/580 "2018-03-16T18:25:19Z")

</div>

Is ApproxFun able to compute the eigenstates of a 1dimensional linear differential operator in the way Chebfun does? I assume not yet. I am interested in the Schroedinger equation. michele

---

## [Unusual error: no method matching lufact!(::SparseMatrixCSC{Float32,Int64}, ::Type{Val{true}})](https://discourse.julialang.org/t/unusual-error-no-method-matching-lufact-sparsematrixcsc-float32-int64-type-val-true/9666)

<div class="topic-metadata">

**Author:** [@Ian\_Williamson](https://discourse.julialang.org/u/Ian_Williamson)\
**Replies:** 12\
**Last updated:** [March 13, 2018, 5:18pm UTC](https://discourse.julialang.org/t/unusual-error-no-method-matching-lufact-sparsematrixcsc-float32-int64-type-val-true/9666 "2018-03-13T17:18:09Z")

</div>

Greetings, I am new to Julia and have been looking at using it to solve sparse systems. When I run the following simple code snippet: A = sprand(Float32, 10, 10, .5); b = rand(Float32, 10); A\\b I get the following err…

---

## [Matix with equations for elements](https://discourse.julialang.org/t/matix-with-equations-for-elements/9632)

<div class="topic-metadata">

**Author:** [@Somayeh\_Esmaeili](https://discourse.julialang.org/u/Somayeh_Esmaeili)\
**Replies:** 1\
**Last updated:** [March 10, 2018, 2:33pm UTC](https://discourse.julialang.org/t/matix-with-equations-for-elements/9632 "2018-03-10T14:33:19Z")

</div>

0 down vote favorite I have this constraint in my code. i=number of supplier p=type of productions t=number of period constraint=@NLconstraint(con1\[i=1:3,p=1:2,t=1:3\],E(I)\[i,p,t \]= sum(Q\[i,p,s\] fors=1:t)-sum(E(D)…

---

## [About QR decomposition - linear algebra](https://discourse.julialang.org/t/about-qr-decomposition-linear-algebra/9606)

<div class="topic-metadata">

**Author:** [@klacru](https://discourse.julialang.org/u/klacru)\
**Replies:** 12\
**Last updated:** [March 9, 2018, 4:58pm UTC](https://discourse.julialang.org/t/about-qr-decomposition-linear-algebra/9606 "2018-03-09T16:58:45Z")

</div>

A fully pivoted QR-factorization of a (m,n)-matrix A of floating point real or complex numbers has the purpose to provide a de-composition (1) Pr \* A \* Pc = Q \* R where Pr and Pc are permutations of rows and columns of…

---

## [Lufact SparseMatrixCSC Int32](https://discourse.julialang.org/t/lufact-sparsematrixcsc-int32/6784)

<div class="topic-metadata">

**Author:** [@lkskstlr](https://discourse.julialang.org/u/lkskstlr)\
**Replies:** 9\
**Last updated:** [February 27, 2018, 6:03pm UTC](https://discourse.julialang.org/t/lufact-sparsematrixcsc-int32/6784 "2018-02-27T18:03:28Z")

</div>

Hi everyone, I am very new to Julia, so please let me know if there is info in the documentation that would have avoided the issue. I use the following version: Julia Version 0.6.1 Commit 0d7248e (2017-10-24 22:15 UTC)…

---

## [\`isposdef\` inconsistent results, numerically unstable?](https://discourse.julialang.org/t/isposdef-inconsistent-results-numerically-unstable/9013)

<div class="topic-metadata">

**Author:** [@mohamed82008](https://discourse.julialang.org/u/mohamed82008)\
**Replies:** 54\
**Last updated:** [February 21, 2018, 9:34am UTC](https://discourse.julialang.org/t/isposdef-inconsistent-results-numerically-unstable/9013 "2018-02-21T09:34:06Z")

</div>

I am checking here before opening an issue. https://www.dropbox.com/s/qgefu7t85rcr7xe/posdef\_symm\_sparse\_matrix.jld?dl=0 Using the above jld file holding a symmetric matrix A, the following results are very weird: jul…

---

## [Eigenvalues of Hessenberg matrix (ZHSEQR)](https://discourse.julialang.org/t/eigenvalues-of-hessenberg-matrix-zhseqr/8919)

<div class="topic-metadata">

**Author:** [@goerz](https://discourse.julialang.org/u/goerz)\
**Replies:** 2\
**Last updated:** [February 8, 2018, 8:13am UTC](https://discourse.julialang.org/t/eigenvalues-of-hessenberg-matrix-zhseqr/8919 "2018-02-08T08:13:50Z")

</div>

Does Julia have a method to calculate the eigenvalues of a Hessenberg matrix? This would a wrapper around the ZHSEQR Lapack routine (I didn’t find anything in Base.LinAlg.LAPACK).

---

## [A Julian function interpolation library?](https://discourse.julialang.org/t/a-julian-function-interpolation-library/8721)

<div class="topic-metadata">

**Author:** [@MaximilianJHuber](https://discourse.julialang.org/u/MaximilianJHuber)\
**Replies:** 5\
**Last updated:** [February 3, 2018, 8:45am UTC](https://discourse.julialang.org/t/a-julian-function-interpolation-library/8721 "2018-02-03T08:45:27Z")

</div>

When you want to interpolate a function (match its values on some grid points and approximate it off grid) you: Generate a matrix with evaluations of basis function on the grid and find a linear combination of those th…

---

## [Help with eigenvalue decomposition for symmetric matrices](https://discourse.julialang.org/t/help-with-eigenvalue-decomposition-for-symmetric-matrices/8272)

<div class="topic-metadata">

**Author:** [@MarioSouto](https://discourse.julialang.org/u/MarioSouto)\
**Replies:** 2\
**Last updated:** [January 25, 2018, 3:17pm UTC](https://discourse.julialang.org/t/help-with-eigenvalue-decomposition-for-symmetric-matrices/8272 "2018-01-25T15:17:47Z")

</div>

Dear all, For some reason Julia’s eigenvalue factorization for symmetric matrices is considerable slow in my machine (MacBook Air, 1.8 GHz Intel Core i5, 4 GB 1600 MHz DDR3). In this same machine, Scipy’s eigenvalue fac…

---

## [Converting Float32 to N0f32 in FixedPointNumbers.jl](https://discourse.julialang.org/t/converting-float32-to-n0f32-in-fixedpointnumbers-jl/8555)

<div class="topic-metadata">

**Author:** [@jwu](https://discourse.julialang.org/u/jwu)\
**Replies:** 2\
**Last updated:** [January 24, 2018, 4:22pm UTC](https://discourse.julialang.org/t/converting-float32-to-n0f32-in-fixedpointnumbers-jl/8555 "2018-01-24T16:22:57Z")

</div>

this works in Julia 0.6.2: Float32(1.0) |\> N0f8 Float32(1.0) |\> N0f16 this will not work Float32(1.0) |\> N0f32 Float32(1.0) |\> N0f64 Float64(1.0) |\> N0f64 It looks like when the number of bits is the same or larger, …

---

## [Rationalize() error](https://discourse.julialang.org/t/rationalize-error/8544)

<div class="topic-metadata">

**Author:** [@Yaroslav\_Kavenchuk](https://discourse.julialang.org/u/Yaroslav_Kavenchuk)\
**Replies:** 2\
**Last updated:** [January 23, 2018, 9:34pm UTC](https://discourse.julialang.org/t/rationalize-error/8544 "2018-01-23T21:34:56Z")

</div>

\_ \_ \_ \_(\_)\_ | A fresh approach to technical computing (\_) | (\_) (\_) | Documentation: https://docs.julialang.org \_ \_ \_| |\_ \_\_ \_ | Type "?help" for help. | | | | | | |/ \_\` …

---

## [Rounding off error in simple calculations](https://discourse.julialang.org/t/rounding-off-error-in-simple-calculations/8543)

<div class="topic-metadata">

**Author:** [@sambitdash](https://discourse.julialang.org/u/sambitdash)\
**Replies:** 3\
**Last updated:** [January 23, 2018, 12:34pm UTC](https://discourse.julialang.org/t/rounding-off-error-in-simple-calculations/8543 "2018-01-23T12:34:23Z")

</div>

julia\> 2.5/3 0.8333333333333334 The result should have been reported 0.8333333333333333. An infinite series of 3s will never reach to 4 and will be a floor when rounded. Is there any specific reason we have preferred r…

---

## [Confused \`spdiagm\` with matlab function](https://discourse.julialang.org/t/confused-spdiagm-with-matlab-function/8525)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 4\
**Last updated:** [January 22, 2018, 5:16pm UTC](https://discourse.julialang.org/t/confused-spdiagm-with-matlab-function/8525 "2018-01-22T17:16:33Z")

</div>

I’m having issues running cholfact on a sparse tridiagonal matrix (Julia v0.6) which works in matlab. When I try to factor L: L = spdiagm((-1.\*v,10.\*v,-1.\*v),(-1,0,1)) println(typeof(L)) cholfact(L) I get: SparseMatri…

---

## [ANN: InplaceRealFFT.jl : inplace real-to-complex and complex-to-real FFT](https://discourse.julialang.org/t/ann-inplacerealfft-jl-inplace-real-to-complex-and-complex-to-real-fft/8116)

<div class="topic-metadata">

**Author:** [@favba](https://discourse.julialang.org/u/favba)\
**Replies:** 25\
**Last updated:** [January 5, 2018, 6:32am UTC](https://discourse.julialang.org/t/ann-inplacerealfft-jl-inplace-real-to-complex-and-complex-to-real-fft/8116 "2018-01-05T06:32:50Z")

</div>

Hello everyone! I’ve created the InplaceRealFFT.jl module to expose FFTW’s inplace real-to-complex (rfft!) and complex-to-real (irfft!) transformations. Currently, Julia only provides inplace version of the transform f…

---

## [Type stable matrix factorization corner case with ForwardDiff](https://discourse.julialang.org/t/type-stable-matrix-factorization-corner-case-with-forwarddiff/7791)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 9\
**Last updated:** [December 19, 2017, 1:21pm UTC](https://discourse.julialang.org/t/type-stable-matrix-factorization-corner-case-with-forwarddiff/7791 "2017-12-19T13:21:16Z")

</div>

I am calculating the log likelihood of multivariate normals with a function like below, and I want it to work smoothly with ForwardDiff.jl. The catch is that when the variance is not psd (eg with zero eigenvalues), I wan…

---

## [Can the following list of transformations turn a stable well conditioned algorithm into an unstable one?](https://discourse.julialang.org/t/can-the-following-list-of-transformations-turn-a-stable-well-conditioned-algorithm-into-an-unstable-one/7413)

<div class="topic-metadata">

**Author:** [@certik](https://discourse.julialang.org/u/certik)\
**Replies:** 5\
**Last updated:** [December 17, 2017, 6:56am UTC](https://discourse.julialang.org/t/can-the-following-list-of-transformations-turn-a-stable-well-conditioned-algorithm-into-an-unstable-one/7413 "2017-12-17T06:56:08Z")

</div>

Can the following set of transformations: -(a - b) → b - a x - x → 0.0 -(a + b) → (-a) - b -(a + b) → (-b) - a x / C → x \* (1.0 / C) (a \* c) + (b \* c) → (a + b) \* c (a + b) \* c → (a \* c) + (b \* c) a \* (b / c) → (…

---

## [Fate of ReverseDiffSource](https://discourse.julialang.org/t/fate-of-reversediffsource/7743)

<div class="topic-metadata">

**Author:** [@cscherrer](https://discourse.julialang.org/u/cscherrer)\
**Replies:** 12\
**Last updated:** [December 15, 2017, 11:17am UTC](https://discourse.julialang.org/t/fate-of-reversediffsource/7743 "2017-12-15T11:17:37Z")

</div>

Though it has some constraints, source-rewrite autodiff is appealing when it can apply, because of the potential code efficiency. Especially for reverse-mode autodiff, the most application is to evaluate gradients, which…

---

## [Problem with ForwardDiff and pre-allocating vector](https://discourse.julialang.org/t/problem-with-forwarddiff-and-pre-allocating-vector/7741)

<div class="topic-metadata">

**Author:** [@jacobcvt12](https://discourse.julialang.org/u/jacobcvt12)\
**Replies:** 6\
**Last updated:** [December 14, 2017, 8:37pm UTC](https://discourse.julialang.org/t/problem-with-forwarddiff-and-pre-allocating-vector/7741 "2017-12-14T20:37:42Z")

</div>

I’m attempting to use ForwardDiff in a function that involves several instances of pre-allocating vectors. I’ve boiled the function down to the cause of the bug using ForwardDiff function f(x) tmp = zeros(2) …

---

## [DifferentialEquations.jl: split differential equation with explicit propagators](https://discourse.julialang.org/t/differentialequations-jl-split-differential-equation-with-explicit-propagators/7572)

<div class="topic-metadata">

**Author:** [@antoine-levitt](https://discourse.julialang.org/u/antoine-levitt)\
**Replies:** 3\
**Last updated:** [December 6, 2017, 7:45pm UTC](https://discourse.julialang.org/t/differentialequations-jl-split-differential-equation-with-explicit-propagators/7572 "2017-12-06T19:45:03Z")

</div>

I have a PDE that is (not exactly but close to) du/dt + v \\cdot du/dx = A(x)u, where x is 2D, u is a vector with two components and A is a 2x2 matrix. The initial data possibly has shocks (discontinuities). Right now I u…

---

## [Symv producing incorrect results](https://discourse.julialang.org/t/symv-producing-incorrect-results/7548)

<div class="topic-metadata">

**Author:** [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Replies:** 2\
**Last updated:** [December 5, 2017, 10:02pm UTC](https://discourse.julialang.org/t/symv-producing-incorrect-results/7548 "2017-12-05T22:02:56Z")

</div>

Can anyone reproduce the following bug? julia\> A = randn(10,20) |\> X -\> X \* X'; julia\> x = rand(10); julia\> sA = Symmetric(A); julia\> all( A .== sA ) true julia\> (A \* x)' 1×10 RowVector{Float64,Array{Float64,1}}: 1…

---

## [Incorrect Bound Error Exception](https://discourse.julialang.org/t/incorrect-bound-error-exception/7525)

<div class="topic-metadata">

**Author:** [@tlagos](https://discourse.julialang.org/u/tlagos)\
**Replies:** 1\
**Last updated:** [December 5, 2017, 12:11pm UTC](https://discourse.julialang.org/t/incorrect-bound-error-exception/7525 "2017-12-05T12:11:24Z")

</div>

Hello, I’m doing a enumeration of solutions in a simulation framework. As an example, I’m consulting if the k-th component in the t-th period was already visited: sum(wx\[k,1:t\])==0 The weird thing is that is throwing…

---

## [When shall I use \`BLAS.axpy!\` and when \`muladd\`?](https://discourse.julialang.org/t/when-shall-i-use-blas-axpy-and-when-muladd/7466)

<div class="topic-metadata">

**Author:** [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Replies:** 6\
**Last updated:** [December 3, 2017, 2:22pm UTC](https://discourse.julialang.org/t/when-shall-i-use-blas-axpy-and-when-muladd/7466 "2017-12-03T14:22:03Z")

</div>

Can’t tell much difference between the two. Any insights? Thanks.

---

## [Accurate summation algorithm](https://discourse.julialang.org/t/accurate-summation-algorithm/7163)

<div class="topic-metadata">

**Author:** [@certik](https://discourse.julialang.org/u/certik)\
**Replies:** 34\
**Last updated:** [December 1, 2017, 7:45pm UTC](https://discourse.julialang.org/t/accurate-summation-algorithm/7163 "2017-12-01T19:45:05Z")

</div>

Stefan Karpinski posted an interesting challenge in https://github.com/JuliaLang/julia/issues/24568#issuecomment-344760163: Try to find a summation algorithm whose results are always between (1-1e-14)\*s and (1+1e-14)\*s…

---

## [Simple PDE benchmark](https://discourse.julialang.org/t/simple-pde-benchmark/7430)

<div class="topic-metadata">

**Author:** [@antoine-levitt](https://discourse.julialang.org/u/antoine-levitt)\
**Replies:** 14\
**Last updated:** [December 1, 2017, 5:53pm UTC](https://discourse.julialang.org/t/simple-pde-benchmark/7430 "2017-12-01T17:53:19Z")

</div>

Hi, I made a simple benchmark to try and convince colleagues to switch to Julia. It might be of interest to people, so here it is : https://github.com/antoine-levitt/benchmark\_heat. It’s the most simple PDE code I could…

---

## [Eigfact and eigen in R seems does not match](https://discourse.julialang.org/t/eigfact-and-eigen-in-r-seems-does-not-match/7341)

<div class="topic-metadata">

**Author:** [@babaq](https://discourse.julialang.org/u/babaq)\
**Replies:** 5\
**Last updated:** [November 28, 2017, 5:58am UTC](https://discourse.julialang.org/t/eigfact-and-eigen-in-r-seems-does-not-match/7341 "2017-11-28T05:58:24Z")

</div>

In the process of converting some R code to Julia, i found the matrix Eigen decomposition produce different result compared to R. the following code is tested in Julia 0.6, and R 3.3.3 through RCall 0.8.1 using RCall a=…

---

## [When "if (a\<b) x=1/(a-b)" divides by zero](https://discourse.julialang.org/t/when-if-a-b-x-1-a-b-divides-by-zero/7154)

<div class="topic-metadata">

**Author:** [@certik](https://discourse.julialang.org/u/certik)\
**Replies:** 4\
**Last updated:** [November 22, 2017, 12:59am UTC](https://discourse.julialang.org/t/when-if-a-b-x-1-a-b-divides-by-zero/7154 "2017-11-22T00:59:25Z")

</div>

This came up in https://github.com/JuliaLang/julia/issues/24568, specifically this comment https://github.com/JuliaLang/julia/issues/24568#issuecomment-345004303. The question was, just looking at a code float X, XMin, …

---

## [Is it possible for Julia to gradually replace C++ in financial numerical computation?](https://discourse.julialang.org/t/is-it-possible-for-julia-to-gradually-replace-c-in-financial-numerical-computation/7222)

<div class="topic-metadata">

**Author:** [@Yifan\_Liu](https://discourse.julialang.org/u/Yifan_Liu)\
**Replies:** 3\
**Last updated:** [November 21, 2017, 10:42pm UTC](https://discourse.julialang.org/t/is-it-possible-for-julia-to-gradually-replace-c-in-financial-numerical-computation/7222 "2017-11-21T22:42:17Z")

</div>

I just noticed that Professor Mark Joshi passed away last month, and I have really benefited from his book C++ Design Patterns and Derivatives Pricing when I was dong my master’s degree. I was wondering if it is possibl…

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

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