- August 18th, 2013, 6:45 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

<r>Though not Finance here is an ugly one (even for tanh-sinh = double exponential,I think), finite interval, non-oscillating, mildly singular boundary in x=1:Int(cosh(x)/(1/cosh(x)-1/cosh(b))^(1/2), x = 0 .. b) = Int(cosh(b)^(1/2)*b*cosh(x*b)^(3/2)/(cosh(b)-cosh(x*b))^(1/2), x = 0 .. 1) =Int(.5*cos...

- August 17th, 2013, 1:20 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

<t>For that oscillating task it is the false recipe to reduce to a finite interval.Anyway: Int(sin(t)/t, t = 0 .. infinity) = Int(sin(t)/t, t = 0 .. Pi) + Tail,Tail = Int(sin(t)/t, t = 0 .. infinity) and now integration by parts gives -1/Pi-Int(cos(t)/t^2, t = Pi .. infinity) and doing some more we ...

- August 17th, 2013, 9:07 am
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

To have it precisely: "Tanh-Sinh" (in the form you have it) does not work properly for sin(t)/t ?

- August 16th, 2013, 8:01 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

<t>Allow me just a remark:I think you will have to cover Fourier transform (like the sin or cos discussed,not that Trefethen task). And for that I am not sure, whether (practically) they'all' can be covered by Gauss methods + acceleration for performance reasons.One way is to model/approximate the F...

- August 16th, 2013, 2:50 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

Though I have not tried the given code. Thus I better should have said: I guess that it does (and I guess that Cuchulainn will show it).

- August 15th, 2013, 7:01 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

It is the Fourier Sinus transform of 2 * 1/t, thus it is Pi (up to scaling)Another way is to look at it as Sinus Integral, using t = 1/x it is like thetask he treats in the parallel thread using the Tanh-Sinh integrator(which works here).

- August 14th, 2013, 9:22 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

<t>@ And2Ok, but automatic integrators should work without manual work - no ?Else ugly test make not so much sense (they are thought just for theautomatic case to find out limitations)I think you should share your work in case you use that form ...@ CuchulainnI mean the Cosine Transform. Trefethen's...

- August 14th, 2013, 5:13 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

Sorry, oscillating towards 0 - actually it is a Fourier-Cosinus Integral, x=exp(-t).With some estimation you may replace 0 by exp(-7*Pi) to have the same in doubleprecision and only finite oscillations (kind of recipe for ugly tests).

- August 13th, 2013, 6:21 pm
- Forum: Numerical Methods Forum
- Topic: Looking for tough integrals
- Replies:
**148** - Views:
**16955**

<t>Oscillating is somewhat unfair, it is a special task.Here are 3, singular at boundaries using log (feel free to transform to infinity)and the values for Int(f, x = 0 ... 1)f1 := 1/((-x*ln(x))^(3/4)), result = 5.12738670408169512f2 := (-ln(x))^((-ln(x))^(1/2)), result = 2.59513246137560063f3 := x^...

- May 20th, 2013, 6:56 pm
- Forum: Programming and Software Forum
- Topic: C++ quiz --- STL tricks
- Replies:
**217** - Views:
**158986**

i.e: the compiler kicks out empty instructions, yes?

- May 16th, 2013, 8:00 pm
- Forum: Programming and Software Forum
- Topic: C++ quiz - Maths and acccuracy
- Replies:
**541** - Views:
**58299**

Yes, nice and covering IEEE0.49999999999999994 = 9007199254740991/9007199254740992*pow(2,-1) = 1/2 - pow(2,-53)/2.Now adding 1/2 is 1 - pow(2,-53)/2. But the largest IEEE below 1 is 1 - DBL_EPS,/2 where DBL_EPS = pow(2,-51)/2

- May 11th, 2013, 8:18 pm
- Forum: Programming and Software Forum
- Topic: C++ quiz - Maths and acccuracy
- Replies:
**541** - Views:
**58299**

<r>What a nonsense about the Bourbaki group (and misunderstanding Gödel's theorems [thereare 2 of them], which made Hilbert to quit studying Logic), writing an encyclopedia doesnot reflect working style.Who ever read papers or seminar reports or listened lectures of them or their descendantswould kn...

- May 11th, 2013, 6:47 pm
- Forum: Programming and Software Forum
- Topic: C++ quiz - Maths and acccuracy
- Replies:
**541** - Views:
**58299**

Yes, that's quite naive or basic, at least, and depending on targeted audience. There is some difference between coder vs programmer/analyst, also in Numerics.Just note: there is no abstract Math ..., which carries over to coding ...

- May 6th, 2013, 7:13 pm
- Forum: Programming and Software Forum
- Topic: C++ quiz - Maths and acccuracy
- Replies:
**541** - Views:
**58299**

<t>Re: integration Hm, though Gauss-Laguerre seems 'natural' for the (positive) Reals I would say it isnot, for at least 2 reasons: 1) Numerical support may be very finite (like in Heston for time = large). And 2) onehas to care for oscillations (IIRC especially for OTM, where for short time the ran...

- May 5th, 2013, 6:31 pm
- Forum: Programming and Software Forum
- Topic: C++ quiz - Maths and acccuracy
- Replies:
**541** - Views:
**58299**

<t>Re the FT: there is perhaps no general answer, except passing to the real part by value = Re(Int(...)) = Int(Re(...)) and working around complex numerics as far andas soon as possible.The example is a bit 'unfair', since Numerics will quite often violate analytic identities. But in some sense it ...

GZIP: On