Re: Simple question or how Mathematica getting on my nerves.
- To: mathgroup at smc.vnet.net
- Subject: [mg45783] Re: [mg45779] Simple question or how Mathematica getting on my nerves.
- From: Andrzej Kozlowski <akoz at mimuw.edu.pl>
- Date: Sun, 25 Jan 2004 03:04:39 -0500 (EST)
- References: <200401240536.AAA07517@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
On 24 Jan 2004, at 05:36, George wrote:
> Although the 2 results must be the same they aren't. WHY???????
> And not only this, but they differ by 10^21!!!!!! WHY????????
>
> Please copy and paste this to Mathematica (i tried 5.0 and 4.2) to
> understand what i mean:
>
>
> \!\(k[f_] :=
> 2687176093959399272413585923303421161600\ *\((1 - f)\)\^67\ *
> f\^61\[IndentingNewLine]
> N[\[Integral]\_\(6214\/10000\)\%\(5242\/10000\)k[
> f] \[DifferentialD]f]\[IndentingNewLine]
> N[\[Integral]\_0.6214\%0.5242 k[f] \[DifferentialD]f]\)
>
>
No, they mustn't be the same, at least not in Mathematica. In
Mathemtica, 6214/10000 and 0.6214 are not at all the same, since
Precision[0.6214]
MachinePrecision
Precision[6214/10000]
Infinity
You need a lot of precision in the limits in your case to get an
accurate answer, compare:
k[f_] := 2687176093959399272413585923303421161600*
(1 - f)^67*f^61
Integrate[k[f], {f, N[6214/10000, MachinePrecision],
N[5242/10000, MachinePrecision]}]
2.056906588664101*^22
Integrate[k[f], {f, N[6214/10000, 20], N[5242/10000, 20]}]
0``-20.81782624184503
Integrate[k[f], {f, N[6214/10000, 50], N[5242/10000, 50]}]
-0.1398383104167567265`8.464671124714428
Only the last answer is accurate.
Andrzej Kozlowski
Chiba, Japan
http://www.mimuw.edu.pl/~akoz/
- References:
- Simple question or how Mathematica getting on my nerves.
- From: gtsavdar@auth.gr (George)
- Simple question or how Mathematica getting on my nerves.