# Numerics

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

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

**Page:** 42

---

## [Error using ForwardDiff](https://discourse.julialang.org/t/error-using-forwarddiff/5339)

<div class="topic-metadata">

**Author:** [@vgdev](https://discourse.julialang.org/u/vgdev)\
**Replies:** 1\
**Last updated:** [August 11, 2017, 10:32pm UTC](https://discourse.julialang.org/t/error-using-forwarddiff/5339 "2017-08-11T22:32:20Z")

</div>

Hi, I am new to ForwardDiff. However, I get an error which i cant understand why occurs. function get\_rho(a) return sqrt(2.0\*a+1.0)/(a+1.0) end @time ForwardDiff.gradient(a -\>get\_rho(a), -0.43) From the code above I …

---

## [Bigfloat lufact](https://discourse.julialang.org/t/bigfloat-lufact/4653)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 8\
**Last updated:** [August 2, 2017, 3:25pm UTC](https://discourse.julialang.org/t/bigfloat-lufact/4653 "2017-08-02T15:25:05Z")

</div>

Has anyone noticed anything odd with lufact on BigFloats? Is there some theoretical weird instability thing I should know about? I am wondering because as I am testing some algorithms I am noticing a pattern that the sam…

---

## [Computation of function moments](https://discourse.julialang.org/t/computation-of-function-moments/5074)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 3\
**Last updated:** [July 28, 2017, 5:27am UTC](https://discourse.julialang.org/t/computation-of-function-moments/5074 "2017-07-28T05:27:45Z")

</div>

I would like to compute \\int\_a^b(f-\\bar{f})^ndx where \\bar{f}=\\int\_a^bf dx. Is it possible to compute it in one pass?

---

## [Evaluate integral on many points (Cubature.jl ?)](https://discourse.julialang.org/t/evaluate-integral-on-many-points-cubature-jl/1723)

<div class="topic-metadata">

**Author:** [@piever](https://discourse.julialang.org/u/piever)\
**Replies:** 44\
**Last updated:** [July 26, 2017, 2:55pm UTC](https://discourse.julialang.org/t/evaluate-integral-on-many-points-cubature-jl/1723 "2017-07-26T14:55:54Z")

</div>

I need to compute an integral on the real line. The tricky part is that I need to compute this integral from many different starting points. The integration package Cubature.jl, which I was trying to use, allows to co…

---

## [Irfft with A\_mul\_B! messes up its input](https://discourse.julialang.org/t/irfft-with-a-mul-b-messes-up-its-input/4762)

<div class="topic-metadata">

**Author:** [@navidcy](https://discourse.julialang.org/u/navidcy)\
**Replies:** 1\
**Last updated:** [July 10, 2017, 2:53pm UTC](https://discourse.julialang.org/t/irfft-with-a-mul-b-messes-up-its-input/4762 "2017-07-10T14:53:01Z")

</div>

Using A\_mul\_B! seems to be messing up it’s input. I attach a .jl file (INPUT) and the output I get on my machine. The output’s last line is the one which is puzzling! INPUT # Code snippet to test nx, ny = 8, 8 nk, nl =…

---

## [Generic Julia FFT](https://discourse.julialang.org/t/generic-julia-fft/4759)

<div class="topic-metadata">

**Author:** [@MikaelSlevinsky](https://discourse.julialang.org/u/MikaelSlevinsky)\
**Replies:** 1\
**Last updated:** [July 10, 2017, 2:48pm UTC](https://discourse.julialang.org/t/generic-julia-fft/4759 "2017-07-10T14:48:59Z")

</div>

Now that FFTW.jl and AbstractFFTs.jl are being moved out of Base for 0.7, (where) will a pure Julia FFT be implemented?

---

## [DifferentialEquations.jl: Problems with event detection](https://discourse.julialang.org/t/differentialequations-jl-problems-with-event-detection/4462)

<div class="topic-metadata">

**Author:** [@helgee](https://discourse.julialang.org/u/helgee)\
**Replies:** 2\
**Last updated:** [June 26, 2017, 8:25am UTC](https://discourse.julialang.org/t/differentialequations-jl-problems-with-event-detection/4462 "2017-06-26T08:25:56Z")

</div>

Hi folks, I am having problems getting event detection to work properly in DifferentialEquations.jl. I have reduced the code as far as possible: using DifferentialEquations using PyPlot function evaluate!(t, y, δy) …

---

## [AbstractFloat math (Is anybody already doing this?)](https://discourse.julialang.org/t/abstractfloat-math-is-anybody-already-doing-this/4363)

<div class="topic-metadata">

**Author:** [@Per](https://discourse.julialang.org/u/Per)\
**Replies:** 4\
**Last updated:** [June 20, 2017, 2:59pm UTC](https://discourse.julialang.org/t/abstractfloat-math-is-anybody-already-doing-this/4363 "2017-06-20T14:59:44Z")

</div>

I’m planning an open-source (MIT license) project to do in my spare time, but I thought it might be a good idea to check with the community first, in case anybody is already doing something similar. My idea is to write …

---

## [Trap floating point exceptions](https://discourse.julialang.org/t/trap-floating-point-exceptions/4157)

<div class="topic-metadata">

**Author:** [@antoine-levitt](https://discourse.julialang.org/u/antoine-levitt)\
**Replies:** 0\
**Last updated:** [June 8, 2017, 2:08am UTC](https://discourse.julialang.org/t/trap-floating-point-exceptions/4157 "2017-06-08T02:08:27Z")

</div>

Some languages and compilers allow trapping floating point exceptions so that, for instance, a computation producing a NaN stops. This is very useful for debugging. Can this be done in julia? There’s https://github.com/J…

---

## [Announcement: Fast Spherical Harmonics](https://discourse.julialang.org/t/announcement-fast-spherical-harmonics/3810)

<div class="topic-metadata">

**Author:** [@MikaelSlevinsky](https://discourse.julialang.org/u/MikaelSlevinsky)\
**Replies:** 0\
**Last updated:** [May 19, 2017, 4:29pm UTC](https://discourse.julialang.org/t/announcement-fast-spherical-harmonics/3810 "2017-05-19T16:29:19Z")

</div>

I’m excited to announce a major release of FastTransforms.jl introducing the first fast and backward stable transform between spherical harmonic expansions and bivariate Fourier series! And it’s in Julia first. Convert …

---

## [Special functions , associated Legendre type 3](https://discourse.julialang.org/t/special-functions-associated-legendre-type-3/2163)

<div class="topic-metadata">

**Author:** [@elaine](https://discourse.julialang.org/u/elaine)\
**Replies:** 15\
**Last updated:** [May 23, 2017, 12:51am UTC](https://discourse.julialang.org/t/special-functions-associated-legendre-type-3/2163 "2017-05-23T00:51:33Z")

</div>

I have some special functions. I would like to deposit them into someone’s existing / new projects. An example: function mylegenp3(n,m,z)# n,m integers , z \> 1,associated Legendre v=(z\*z - big(1.))^(-m\*big(1)/2) …

---

## [Specifying the coefficients for a 2D polynomial in ApproxFun.jl](https://discourse.julialang.org/t/specifying-the-coefficients-for-a-2d-polynomial-in-approxfun-jl/3782)

<div class="topic-metadata">

**Author:** [@JackDevine](https://discourse.julialang.org/u/JackDevine)\
**Replies:** 4\
**Last updated:** [May 18, 2017, 8:13pm UTC](https://discourse.julialang.org/t/specifying-the-coefficients-for-a-2d-polynomial-in-approxfun-jl/3782 "2017-05-18T20:13:50Z")

</div>

I am trying to understand how ApproxFun.jl constructs 2D functions from their coefficients. In 1D, it all makes sense, for example: julia\> using ApproxFun julia\> f = Fun(Interval(-1, 1), \[1,2,3\]) Fun(Chebyshev(【-1.0,1.…

---

## [Speed up this code game](https://discourse.julialang.org/t/speed-up-this-code-game/3666)

<div class="topic-metadata">

**Author:** [@Glen](https://discourse.julialang.org/u/Glen)\
**Replies:** 13\
**Last updated:** [May 17, 2017, 3:37am UTC](https://discourse.julialang.org/t/speed-up-this-code-game/3666 "2017-05-17T03:37:45Z")

</div>

Hi, Brag points are up for grabs again. How can this code be made faster? using BenchmarkTools using Base.Test struct Point{X,Y} x::X y::Y end function integral\_squared(v::Vector{Point{X,Y}}) where {X,Y} …

---

## [A question on extrapolation with Interpolations.jl](https://discourse.julialang.org/t/a-question-on-extrapolation-with-interpolations-jl/3669)

<div class="topic-metadata">

**Author:** [@JackDevine](https://discourse.julialang.org/u/JackDevine)\
**Replies:** 15\
**Last updated:** [May 15, 2017, 9:20am UTC](https://discourse.julialang.org/t/a-question-on-extrapolation-with-interpolations-jl/3669 "2017-05-15T09:20:37Z")

</div>

Say that I make an array that I want to do extrapolation on: using Interpolations a = \[1,2,3,4\] a = interpolate!(a, BSpline(Linear()), OnGrid()) a = extrapolate(a, 3) Then a\[0\] = 3 and likewise for any index outside of…

---

## [Significand of IEEE float as an integer](https://discourse.julialang.org/t/significand-of-ieee-float-as-an-integer/3698)

<div class="topic-metadata">

**Author:** [@fengyang.wang](https://discourse.julialang.org/u/fengyang.wang)\
**Replies:** 2\
**Last updated:** [May 14, 2017, 8:25pm UTC](https://discourse.julialang.org/t/significand-of-ieee-float-as-an-integer/3698 "2017-05-14T20:25:25Z")

</div>

I want a function like frexp, but that returns an integer (of the same size of the floating point) and an exponent. Currently I have tried the following implementation: julia\> inexp(x::T) where T \<: Base.Math.IEEEFloat …

---

## [Bitwise not (~) do noting on windows64](https://discourse.julialang.org/t/bitwise-not-do-noting-on-windows64/3542)

<div class="topic-metadata">

**Author:** [@7akase](https://discourse.julialang.org/u/7akase)\
**Replies:** 5\
**Last updated:** [May 6, 2017, 5:34am UTC](https://discourse.julialang.org/t/bitwise-not-do-noting-on-windows64/3542 "2017-05-06T05:34:39Z")

</div>

Hi. I tried bitwise not operator (~) and get the unchanged result ~123 #=\> 123 while -124 is expected according to the document. I uses v0.5.0 on windows64. Could anyone tell me the proper way to use this operato…

---

## [Matrix Vector Operations to For Loop](https://discourse.julialang.org/t/matrix-vector-operations-to-for-loop/3394)

<div class="topic-metadata">

**Author:** [@mcovalt](https://discourse.julialang.org/u/mcovalt)\
**Replies:** 5\
**Last updated:** [April 27, 2017, 10:29pm UTC](https://discourse.julialang.org/t/matrix-vector-operations-to-for-loop/3394 "2017-04-27T22:29:40Z")

</div>

This could be wishful thinking, but it would be neat if this has been or could be implemented nicely. For my program I have lots of linear operators and maps in the form of sparse matrices. The non-zero structure and va…

---

## [Finite Element Computations On A Cluster Using Petsc.jl](https://discourse.julialang.org/t/finite-element-computations-on-a-cluster-using-petsc-jl/3287)

<div class="topic-metadata">

**Author:** [@hiemstar](https://discourse.julialang.org/u/hiemstar)\
**Replies:** 2\
**Last updated:** [April 21, 2017, 2:41pm UTC](https://discourse.julialang.org/t/finite-element-computations-on-a-cluster-using-petsc-jl/3287 "2017-04-21T14:41:53Z")

</div>

I want to write a parallel distributed isogeometric analysis solver for linear and non-linear elastostatics problems using Julia. For this purpose I need access to distributed linear and non-linear solvers. My first th…

---

## [Slow complex exponential evaluation](https://discourse.julialang.org/t/slow-complex-exponential-evaluation/3170)

<div class="topic-metadata">

**Author:** [@pkairys](https://discourse.julialang.org/u/pkairys)\
**Replies:** 8\
**Last updated:** [April 11, 2017, 3:45pm UTC](https://discourse.julialang.org/t/slow-complex-exponential-evaluation/3170 "2017-04-11T15:45:20Z")

</div>

I am having some issues with code and I can’t seem to reach a solution. Specifically I am re-writing some Matlab code and for one or two things I can’t seem to match the speed of Matlab. Matlab Code: a=\[0:2^24-1\] b=exp…

---

## [GSL's QAWF integration for oscillatory functions](https://discourse.julialang.org/t/gsls-qawf-integration-for-oscillatory-functions/3040)

<div class="topic-metadata">

**Author:** [@mzaffalon](https://discourse.julialang.org/u/mzaffalon)\
**Replies:** 2\
**Last updated:** [April 5, 2017, 6:23am UTC](https://discourse.julialang.org/t/gsls-qawf-integration-for-oscillatory-functions/3040 "2017-04-05T06:23:03Z")

</div>

I feel kind of silly to ask this question, but how am I supposed to pass the integrand to the QAWF routine, whose signature is integration\_qawf(a::Real, epsabs::Real, limit::Integer)? Other integration functions have th…

---

## [Eigenvector precision issues](https://discourse.julialang.org/t/eigenvector-precision-issues/2980)

<div class="topic-metadata">

**Author:** [@evoclue](https://discourse.julialang.org/u/evoclue)\
**Replies:** 6\
**Last updated:** [April 1, 2017, 3:11am UTC](https://discourse.julialang.org/t/eigenvector-precision-issues/2980 "2017-04-01T03:11:19Z")

</div>

I am using eigenfact to extract the eigenvectors corresponding to the 1000 largest eigenvalues from a symmetric matrix. V = eigfact(Symmetric(M))\[:vectors\]\[,1:1000\] V = \[:,end:-1:1\] #sorts V such that V\[:,1\] is the eige…

---

## [Call for bikeshedding: Updated ParameterizedFunction Syntax](https://discourse.julialang.org/t/call-for-bikeshedding-updated-parameterizedfunction-syntax/2738)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 11\
**Last updated:** [March 20, 2017, 2:49pm UTC](https://discourse.julialang.org/t/call-for-bikeshedding-updated-parameterizedfunction-syntax/2738 "2017-03-20T14:49:13Z")

</div>

I know people like bikeshedding syntax :slight\_smile:. I am looking to update the syntax for the macros in DifferentialEquations.jl (ParameterizedFunctions.jl) for “easily defining diffeqs”. I am looking for a syntax tha…

---

## [Eigs and cryptic arparck errors](https://discourse.julialang.org/t/eigs-and-cryptic-arparck-errors/2722)

<div class="topic-metadata">

**Author:** [@maarten\_van\_damme](https://discourse.julialang.org/u/maarten_van_damme)\
**Replies:** 4\
**Last updated:** [March 17, 2017, 4:33pm UTC](https://discourse.julialang.org/t/eigs-and-cryptic-arparck-errors/2722 "2017-03-17T16:33:50Z")

</div>

I’m trying to use eigs and I’m running into arparck errors. More specifically, when eigs doesn’t converge the function itself doesn’t throw or return some kind of flag (even though that is what the documentation seemed t…

---

## [Using ApproxFun for dynamic programming](https://discourse.julialang.org/t/using-approxfun-for-dynamic-programming/1754)

<div class="topic-metadata">

**Author:** [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Replies:** 11\
**Last updated:** [March 11, 2017, 11:41am UTC](https://discourse.julialang.org/t/using-approxfun-for-dynamic-programming/1754 "2017-03-11T11:41:02Z")

</div>

I am wondering how to use ApproxFun for dynamic programming. I know the methods themselves very well, and I can easily implement a Chebyshev or spline basis and do everything from scratch, but it would be nice to use exi…

---

## [Calculating Sparse Jacobians with Autodifferentiation](https://discourse.julialang.org/t/calculating-sparse-jacobians-with-autodifferentiation/2313)

<div class="topic-metadata">

**Author:** [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Replies:** 8\
**Last updated:** [February 28, 2017, 3:08am UTC](https://discourse.julialang.org/t/calculating-sparse-jacobians-with-autodifferentiation/2313 "2017-02-28T03:08:24Z")

</div>

Is there a way with any of the autodifferentiation tools to specify a sprasity pattern or bandedness for the Jacobian? This is something which would be incredibly useful for the differential equation solvers, but I don’t…

---

## [Broken BLAS.gemm with complex rectangular matrix](https://discourse.julialang.org/t/broken-blas-gemm-with-complex-rectangular-matrix/2247)

<div class="topic-metadata">

**Author:** [@dcyang](https://discourse.julialang.org/u/dcyang)\
**Replies:** 5\
**Last updated:** [February 27, 2017, 2:49am UTC](https://discourse.julialang.org/t/broken-blas-gemm-with-complex-rectangular-matrix/2247 "2017-02-27T02:49:45Z")

</div>

Hi, I ran the following short code on two different versions of Julia and got results that are broken in different ways. import Base.LinAlg.BLAS.gemm A = convert(Array{Complex64,2}, \[-6im -5im; -4 3; 2im im\]) println(…

---

## [Any reason holds Julia from having a proper Pochhammer function?](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273)

<div class="topic-metadata">

**Author:** [@chobbes](https://discourse.julialang.org/u/chobbes)\
**Replies:** 9\
**Last updated:** [February 25, 2017, 12:41am UTC](https://discourse.julialang.org/t/any-reason-holds-julia-from-having-a-proper-pochhammer-function/2273 "2017-02-25T00:41:58Z")

</div>

Overflow? Inaccuracy?

---

## [Fixed point decimal type](https://discourse.julialang.org/t/fixed-point-decimal-type/2227)

<div class="topic-metadata">

**Author:** [@fengyang.wang](https://discourse.julialang.org/u/fengyang.wang)\
**Replies:** 2\
**Last updated:** [February 24, 2017, 12:30am UTC](https://discourse.julialang.org/t/fixed-point-decimal-type/2227 "2017-02-24T00:30:34Z")

</div>

Is there a package that provides fixed point decimals? It seems that FixedPointNumbers.jl contains only binary fixed-point types and normed fixed-point types.

---

## [C++ integration - complete example needed](https://discourse.julialang.org/t/c-integration-complete-example-needed/2214)

<div class="topic-metadata">

**Author:** [@Albert65](https://discourse.julialang.org/u/Albert65)\
**Replies:** 12\
**Last updated:** [February 21, 2017, 4:04pm UTC](https://discourse.julialang.org/t/c-integration-complete-example-needed/2214 "2017-02-21T16:04:19Z")

</div>

Hi All, My application is currently written in Matlab with few very specific and time consuming functions implemented as a MEX extensions in C++. I am thinking about switching to Julia or Python, and here is the problem…

---

## [ODE.jl not efficient for Monte Carlo problem?](https://discourse.julialang.org/t/ode-jl-not-efficient-for-monte-carlo-problem/672)

<div class="topic-metadata">

**Author:** [@111](https://discourse.julialang.org/u/111)\
**Replies:** 9\
**Last updated:** [February 21, 2017, 1:55pm UTC](https://discourse.julialang.org/t/ode-jl-not-efficient-for-monte-carlo-problem/672 "2017-02-21T13:55:01Z")

</div>

My code solves the Monte Carlo problem of a large ensemble of particles interacting with field. I use the Newton’s Equations to evolve the system. Numerically, ordinary equation is needed. Some pieces of my code are as f…

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

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