# Numerics

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

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

**Page:** 35

---

## [Sparse arrays "\\"](https://discourse.julialang.org/t/sparse-arrays/30606)

<div class="topic-metadata">

**Author:** [@JuhaHeiskala](https://discourse.julialang.org/u/JuhaHeiskala)\
**Replies:** 2\
**Last updated:** [November 2, 2019, 9:00am UTC](https://discourse.julialang.org/t/sparse-arrays/30606 "2019-11-02T09:00:44Z")

</div>

Apparently “A\\b” is not fully supported for both A and b being sparse arrays. using SparseArrays A=sprand(10,10,0.4) b=sprand(10,10,0.3) A\\b ERROR: MethodError: no method matching ldiv!(::SuiteSparse.UMFPACK.Umfpack…

---

## [Automatic differentiation of complex valued functions](https://discourse.julialang.org/t/automatic-differentiation-of-complex-valued-functions/30263)

<div class="topic-metadata">

**Author:** [@jtravs](https://discourse.julialang.org/u/jtravs)\
**Replies:** 30\
**Last updated:** [November 1, 2019, 8:44am UTC](https://discourse.julialang.org/t/automatic-differentiation-of-complex-valued-functions/30263 "2019-11-01T08:44:17Z")

</div>

Does anyone know if a Julia automatic differentiation package that supports complex valued functions (with real argument)? I have been using ForwardDiff.jl but it is missing this functionality: https://github.com/JuliaD…

---

## [We can write an optimized BLAS library in pure Julia (please skip OP and jump to post 4)](https://discourse.julialang.org/t/we-can-write-an-optimized-blas-library-in-pure-julia-please-skip-op-and-jump-to-post-4/11634)

<div class="topic-metadata">

**Author:** [@Elrod](https://discourse.julialang.org/u/Elrod)\
**Replies:** 17\
**Last updated:** [October 30, 2019, 9:46am UTC](https://discourse.julialang.org/t/we-can-write-an-optimized-blas-library-in-pure-julia-please-skip-op-and-jump-to-post-4/11634 "2019-10-30T09:46:31Z")

</div>

There’s a readme with a lot of output dumped on it here: https://github.com/chriselrod/TriangularMatrices.jl But the highlights are that, I found an fairly optimal “compute kernel” (at least for my architecture on Jul…

---

## [ApproxFun.jl Convolution/Fourier Multiplier](https://discourse.julialang.org/t/approxfun-jl-convolution-fourier-multiplier/30280)

<div class="topic-metadata">

**Author:** [@cpross90](https://discourse.julialang.org/u/cpross90)\
**Replies:** 11\
**Last updated:** [October 30, 2019, 7:20am UTC](https://discourse.julialang.org/t/approxfun-jl-convolution-fourier-multiplier/30280 "2019-10-30T07:20:16Z")

</div>

I’m trying to implement a solver for the Benjamin-Ono equation using DifferentialEquations.jl. I have periodic boundary conditions, so I’m using ApproxFun.jl to take the Fourier transform and use the method of lines to s…

---

## [Fast calculation of eigenvalues](https://discourse.julialang.org/t/fast-calculation-of-eigenvalues/30359)

<div class="topic-metadata">

**Author:** [@FujiwaraTakumiEH](https://discourse.julialang.org/u/FujiwaraTakumiEH)\
**Replies:** 6\
**Last updated:** [October 28, 2019, 1:24am UTC](https://discourse.julialang.org/t/fast-calculation-of-eigenvalues/30359 "2019-10-28T01:24:10Z")

</div>

Background: Now I have a symmetric matrix A. I need to find the first n eigenvalues and eigenvectors. (I have not actually started to write code, but in the algorithm process I observed the need to solve the eigenvalues …

---

## [Strange bug when truncating BigFloat to UInt8](https://discourse.julialang.org/t/strange-bug-when-truncating-bigfloat-to-uint8/30301)

<div class="topic-metadata">

**Author:** [@gmouts](https://discourse.julialang.org/u/gmouts)\
**Replies:** 11\
**Last updated:** [October 25, 2019, 3:11pm UTC](https://discourse.julialang.org/t/strange-bug-when-truncating-bigfloat-to-uint8/30301 "2019-10-25T15:11:18Z")

</div>

I am playing a bit with ridiculously big floating point numbers. The following: setprecision(8640) tf = BigFloat(255.11254081778609618826079023493869737962406296545795414517402744704859236140966993143901247046399018605…

---

## [Did anyone thought of implementing Octave on top of Julia?](https://discourse.julialang.org/t/did-anyone-thought-of-implementing-octave-on-top-of-julia/30211)

<div class="topic-metadata">

**Author:** [@XVilka](https://discourse.julialang.org/u/XVilka)\
**Replies:** 3\
**Last updated:** [October 23, 2019, 11:35am UTC](https://discourse.julialang.org/t/did-anyone-thought-of-implementing-octave-on-top-of-julia/30211 "2019-10-23T11:35:40Z")

</div>

Apparently, a lot of the Octave/MATLAB features are already available in Julia, and implementing Octave language interpreter would allow to save a lot of time for both worlds. So basically, it will boil down to implement…

---

## [How to exclude the columns of a matrix which are present as columns in another matrix](https://discourse.julialang.org/t/how-to-exclude-the-columns-of-a-matrix-which-are-present-as-columns-in-another-matrix/30206)

<div class="topic-metadata">

**Author:** [@Ujku\_KU](https://discourse.julialang.org/u/Ujku_KU)\
**Replies:** 2\
**Last updated:** [October 23, 2019, 8:30am UTC](https://discourse.julialang.org/t/how-to-exclude-the-columns-of-a-matrix-which-are-present-as-columns-in-another-matrix/30206 "2019-10-23T08:30:05Z")

</div>

Hi guys, is there any existing function/method in Julia which checks if the columns of a matrix are columns of another matrix, and remove them from one of the matrices in case there is a positive outcome? Thank you ver…

---

## [Control points from a B-Spline](https://discourse.julialang.org/t/control-points-from-a-b-spline/29674)

<div class="topic-metadata">

**Author:** [@yakir12](https://discourse.julialang.org/u/yakir12)\
**Replies:** 14\
**Last updated:** [October 9, 2019, 11:25am UTC](https://discourse.julialang.org/t/control-points-from-a-b-spline/29674 "2019-10-09T11:25:13Z")

</div>

Is there any way I can retrieve the control points/polygon from a B-Spline (calculated from Dierckx.jl or Interpolations.jl)? Control points as described here and shown as the black polygon here: For instance, in the…

---

## [Fast diag(A'\*B)](https://discourse.julialang.org/t/fast-diag-a-b/29363)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 6\
**Last updated:** [October 1, 2019, 9:05pm UTC](https://discourse.julialang.org/t/fast-diag-a-b/29363 "2019-10-01T21:05:29Z")

</div>

Is there a fast way to compute dot products of the columns of two similar matrices? MWE: using LinearAlgebra, BenchmarkTools f1(A, B) = diag(A'\*B) # suboptimal, but surprisingly fast f2(A, B) = map(dot, eachc…

---

## [Efficient (possibly preallocated) chain of Kronecker products](https://discourse.julialang.org/t/efficient-possibly-preallocated-chain-of-kronecker-products/29328)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 2\
**Last updated:** [September 30, 2019, 8:10pm UTC](https://discourse.julialang.org/t/efficient-possibly-preallocated-chain-of-kronecker-products/29328 "2019-09-30T20:10:32Z")

</div>

I need to calculate something not unlike reduce(kron, As...) where As are 3–8 matrices. If it helps, I can preallocate for the output. Elements of As are dense, the length of As is known at compile time (unrolling is p…

---

## [Another BLAS and Julia comparison](https://discourse.julialang.org/t/another-blas-and-julia-comparison/15411)

<div class="topic-metadata">

**Author:** [@Noel\_Araujo](https://discourse.julialang.org/u/Noel_Araujo)\
**Replies:** 16\
**Last updated:** [September 27, 2019, 11:18am UTC](https://discourse.julialang.org/t/another-blas-and-julia-comparison/15411 "2019-09-27T11:18:53Z")

</div>

Just for fun I did a direct translation of the BLAS function saspy, that is written in Fortran (You can found it here) into Julia. With two small optimizations (@inbounds and @threads) I can get almost the same speed of…

---

## [Gridstudio supports Julia](https://discourse.julialang.org/t/gridstudio-supports-julia/29143)

<div class="topic-metadata">

**Author:** [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Replies:** 0\
**Last updated:** [September 25, 2019, 3:37am UTC](https://discourse.julialang.org/t/gridstudio-supports-julia/29143 "2019-09-25T03:37:35Z")

</div>

https://gridstudio.io/announcement/ Does anyone know about gridstudio? It’s like an online Excel designed for data science.

---

## [Paired symmetric matrix decomposition?](https://discourse.julialang.org/t/paired-symmetric-matrix-decomposition/29092)

<div class="topic-metadata">

**Author:** [@tim.holy](https://discourse.julialang.org/u/tim.holy)\
**Replies:** 1\
**Last updated:** [September 24, 2019, 7:42am UTC](https://discourse.julialang.org/t/paired-symmetric-matrix-decomposition/29092 "2019-09-24T07:42:36Z")

</div>

Do any of the linear algebra gurus here know the name of or a citation for the following paired matrix decomposition: given symmetric matrices A and B, and an arbitrary vector v, find a decomposition of the form A = W D…

---

## [In-place backslash operator for sparse matrices](https://discourse.julialang.org/t/in-place-backslash-operator-for-sparse-matrices/6091)

<div class="topic-metadata">

**Author:** [@tryingtosolve](https://discourse.julialang.org/u/tryingtosolve)\
**Replies:** 1\
**Last updated:** [September 26, 2017, 7:17pm UTC](https://discourse.julialang.org/t/in-place-backslash-operator-for-sparse-matrices/6091 "2017-09-26T19:17:56Z")

</div>

I have been doing A\\b where A is a sparse matrix. However, is there an in place version of \\? I have stumbled upon A\_ldiv\_B! but it seems to me (1) this function has been deprecated and (2) it didn’t work on sparse matr…

---

## [Solving integral equation using DifferentialEquations](https://discourse.julialang.org/t/solving-integral-equation-using-differentialequations/28992)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 7\
**Last updated:** [September 20, 2019, 6:26pm UTC](https://discourse.julialang.org/t/solving-integral-equation-using-differentialequations/28992 "2019-09-20T18:26:21Z")

</div>

Problem I need to solve an equation in x which can be simplified as an MWE into x = \\int\_{x}^\\infty A(z) dz Importantly, A(z) is decreasing, integrable, and goes to 0 at infinity. Possible solution concept I thought …

---

## [Higher derivatives using ForwardDiff](https://discourse.julialang.org/t/higher-derivatives-using-forwarddiff/28814)

<div class="topic-metadata">

**Author:** [@RJDennis](https://discourse.julialang.org/u/RJDennis)\
**Replies:** 8\
**Last updated:** [September 17, 2019, 10:46am UTC](https://discourse.julialang.org/t/higher-derivatives-using-forwarddiff/28814 "2019-09-17T10:46:30Z")

</div>

Hi All, If I have a function, say, test(x) = x\[1\]^3\*log(x\[2\])\*sqrt(x\[3\]) then what is the best way to use ForwardDiff to compute higher-order partial derivatives of this function? I tried the following first\_d(x) = …

---

## [How to call some special functions in julia v0.6?](https://discourse.julialang.org/t/how-to-call-some-special-functions-in-julia-v0-6/5127)

<div class="topic-metadata">

**Author:** [@BVPs](https://discourse.julialang.org/u/BVPs)\
**Replies:** 5\
**Last updated:** [September 14, 2019, 5:56am UTC](https://discourse.julialang.org/t/how-to-call-some-special-functions-in-julia-v0-6/5127 "2019-09-14T05:56:10Z")

</div>

Hello. Apparently, some of the special functions are moved to SpecialFunctions.jl in julia v0.6, e.g., besselj0. When I call this function, it generates the following warning: julia\> using SpecialFunctions julia\> x=0.01…

---

## [Where can I find the most widely adopted implementation of Legendre polynomials?](https://discourse.julialang.org/t/where-can-i-find-the-most-widely-adopted-implementation-of-legendre-polynomials/4183)

<div class="topic-metadata">

**Author:** [@krcools](https://discourse.julialang.org/u/krcools)\
**Replies:** 17\
**Last updated:** [September 11, 2019, 4:59pm UTC](https://discourse.julialang.org/t/where-can-i-find-the-most-widely-adopted-implementation-of-legendre-polynomials/4183 "2019-09-11T16:59:33Z")

</div>

Apart from an implementation hidden somewhere in Jacobi, I could not find where this special, but quite common, function was implemented. Am I missing the obvious location? Maybe it belongs in SpecialFunctions?

---

## [Compute parity of a bit vector](https://discourse.julialang.org/t/compute-parity-of-a-bit-vector/28453)

<div class="topic-metadata">

**Author:** [@Deniz](https://discourse.julialang.org/u/Deniz)\
**Replies:** 3\
**Last updated:** [September 6, 2019, 10:11am UTC](https://discourse.julialang.org/t/compute-parity-of-a-bit-vector/28453 "2019-09-06T10:11:10Z")

</div>

I’m trying to compute the dot product of two UInt8 bit vectors. First I bitwise-xor them, then I have to compute the parity of the result. Is there a simple way to compute the parity of a single byte stored in a UInt8, …

---

## [ForwardDiff & mul!()](https://discourse.julialang.org/t/forwarddiff-mul/28144)

<div class="topic-metadata">

**Author:** [@PharmCat](https://discourse.julialang.org/u/PharmCat)\
**Replies:** 6\
**Last updated:** [August 29, 2019, 10:38am UTC](https://discourse.julialang.org/t/forwarddiff-mul/28144 "2019-08-29T10:38:10Z")

</div>

Is it possible to make ForwardDiff works with mul!() inside function? Or how to optimize allocations when I try to get gradient/hessian of likelihood function?

---

## [BigFloat wrong](https://discourse.julialang.org/t/bigfloat-wrong/27987)

<div class="topic-metadata">

**Author:** [@mefi](https://discourse.julialang.org/u/mefi)\
**Replies:** 7\
**Last updated:** [August 26, 2019, 4:42pm UTC](https://discourse.julialang.org/t/bigfloat-wrong/27987 "2019-08-26T16:42:27Z")

</div>

Why BigFloat(10^(1/4) is wrong? julia\> BigFloat(10^(1/4)) 1.778279410038922758729995621251873672008514404296875 exact: 1.77827941003892280122542119519… Thanks

---

## [JuliaDiffEq with custom types](https://discourse.julialang.org/t/juliadiffeq-with-custom-types/16294)

<div class="topic-metadata">

**Author:** [@mzilhao](https://discourse.julialang.org/u/mzilhao)\
**Replies:** 28\
**Last updated:** [August 25, 2019, 10:37pm UTC](https://discourse.julialang.org/t/juliadiffeq-with-custom-types/16294 "2019-08-25T22:37:18Z")

</div>

i’m writing a program where i’m using my own array type, and i’d like to use DifferentialEquations to solve some ODEs that show up. i was under the impression that it should work with any AbstractArray, but this is eithe…

---

## [Hermitian representation of a matrix](https://discourse.julialang.org/t/hermitian-representation-of-a-matrix/27594)

<div class="topic-metadata">

**Author:** [@darknoob](https://discourse.julialang.org/u/darknoob)\
**Replies:** 5\
**Last updated:** [August 15, 2019, 11:30pm UTC](https://discourse.julialang.org/t/hermitian-representation-of-a-matrix/27594 "2019-08-15T23:30:13Z")

</div>

Hi! I have the following problem: I have done some computations in order to obtain three 4x4-matrices represented as a 12x4-array, aka a span V of 4 linear independet vectors comming from C^12; these 4 vectors build a b…

---

## [Posits - a new approach could sink floating point computation](https://discourse.julialang.org/t/posits-a-new-approach-could-sink-floating-point-computation/26176)

<div class="topic-metadata">

**Author:** [@johnh](https://discourse.julialang.org/u/johnh)\
**Replies:** 49\
**Last updated:** [August 11, 2019, 10:05pm UTC](https://discourse.julialang.org/t/posits-a-new-approach-could-sink-floating-point-computation/26176 "2019-08-11T22:05:08Z")

</div>

Well worth watching this video from the London Julia Meetup. Milan Kloewer using Posits in a real ocean modelling code. You can run the code by defining Mytype=posti - or double, or single precision etc. …

---

## [Sparse cholesky factorization with user permutation (Julia 1.1)](https://discourse.julialang.org/t/sparse-cholesky-factorization-with-user-permutation-julia-1-1/27080)

<div class="topic-metadata">

**Author:** [@JuhaHeiskala](https://discourse.julialang.org/u/JuhaHeiskala)\
**Replies:** 1\
**Last updated:** [August 1, 2019, 7:53pm UTC](https://discourse.julialang.org/t/sparse-cholesky-factorization-with-user-permutation-julia-1-1/27080 "2019-08-01T19:53:08Z")

</div>

The sparse cholesky factorization does not generally keep the user permutation given as parameter. SuiteSparse performs post ordering which is not disabled (as far as I can tell) in the current Julia interface to SuiteS…

---

## [Stiff SDE and \`DiffEq\`](https://discourse.julialang.org/t/stiff-sde-and-diffeq/26851)

<div class="topic-metadata">

**Author:** [@jacob-roth](https://discourse.julialang.org/u/jacob-roth)\
**Replies:** 5\
**Last updated:** [July 31, 2019, 7:20pm UTC](https://discourse.julialang.org/t/stiff-sde-and-diffeq/26851 "2019-07-31T19:20:59Z")

</div>

I’m trying to integrate an SDE with constant, additive, diagonal noise and a “stiff” drift component (the ODE component comes from a singularly perturbed DAE system…). I need to be able to integrate indefinitely (I’m int…

---

## [First-order linear system with time delay as DDEProblem?](https://discourse.julialang.org/t/first-order-linear-system-with-time-delay-as-ddeproblem/27014)

<div class="topic-metadata">

**Author:** [@joshualeond](https://discourse.julialang.org/u/joshualeond)\
**Replies:** 3\
**Last updated:** [July 31, 2019, 5:19pm UTC](https://discourse.julialang.org/t/first-order-linear-system-with-time-delay-as-ddeproblem/27014 "2019-07-31T17:19:45Z")

</div>

I’m new to the diffeq landscape and am working on solving a First Order Plus Dead Time (FOPDT) model: \\tau\_p \\frac{dy(t)}{dt} = -y(t) + K\_p u\\left(t-\\theta\_p\\right) I have data for y(t) and data for u(t) and am havi…

---

## [AD step for iterative solution](https://discourse.julialang.org/t/ad-step-for-iterative-solution/26404)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 11\
**Last updated:** [July 17, 2019, 4:09pm UTC](https://discourse.julialang.org/t/ad-step-for-iterative-solution/26404 "2019-07-17T16:09:48Z")

</div>

Sometimes it would be useful to AD through an iterative algorithm, eg solving a parametric problem f(x, a) = 0 which implicitly defines x(a), but in practice uses an iterative rootfinding method. The math is clear (i…

---

## [Automatic conversion of ^ to repeated \* without applying promotion rule](https://discourse.julialang.org/t/automatic-conversion-of-to-repeated-without-applying-promotion-rule/26261)

<div class="topic-metadata">

**Author:** [@brianguenter](https://discourse.julialang.org/u/brianguenter)\
**Replies:** 7\
**Last updated:** [July 13, 2019, 12:41pm UTC](https://discourse.julialang.org/t/automatic-conversion-of-to-repeated-without-applying-promotion-rule/26261 "2019-07-13T12:41:36Z")

</div>

I’m writing a symbolic differentiation library for Julia (see https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/main-65.pdf if you are interested) and ran into a problem with promote rules and ^. In an …

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

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