Re: My Homework: how to calculate natural log, e?



Mr Hrundi V Bakshi wrote:
[snip]
[program listing]
> >
> > fulfils the 1ulp criterion and is implementable in hardware. Naive Taylor
> > expansion doesn't rate in either software or hardware other than a dumb
> > ox's exercise.
>
> For clf opd's types, replace as appropriate:
>
> real(8), allocatable :: Y(:,:)
>
> write(*,*) 'Naturally, exp(',x,') = ', exp(xkeep), Y(kmax,0)
>
[snip]

So why am I seeing this output?

C:\gfortran>gfortran hvb.f95

C:\gfortran>a
x?
2.3025850929940456840179914546844
Naturally, exp( 2.30258509299405 ) = 10.0000000000000
9.99999967773798
x?

This is with the latest gfortran - MinGW. An explicit FORMAT makes no
real difference. I've also varied X slightly. This does not change the
output from the algorithm posted. How much accuracy should I expect?
(Or should I read Goldberg's paper again???)

-- Elliot

.



Relevant Pages

  • Re: Drag it to the trash...
    ... in hardware to do all that. ... is the registry journalled and is XP a journaling file system? ... Neither of these was in any way an innovation. ...
    (comp.sys.mac.advocacy)
  • Re: The list of INVOKEs
    ... If the hardware was IBM then it ... was idiocy upon idiocy, as the software would most likely be written in a ... turned out that someone changed a JOB card (who ...
    (comp.lang.cobol)
  • Re: C. Elegans brain simulation - does one exist?
    ... > with a digital computer, ... > hardware and the program being executed. ... the same thing because this is all "made up fiction". ...
    (comp.ai.philosophy)
  • Re: [PATCH] Blacklist binary-only modules lying about their license
    ... Marc Boucher wrote: ... > traditional open-source approach) will benefit Linux, ... are you so sure that removing the incentive/reward for hardware vendors ...
    (Linux-Kernel)
  • Re: Another transputer-inspired language?
    ... like nodes but communication channels to pass values between the nodes. ... simple software engineer rather than someone with a wealth of hardware ... process model /have/ to model hardware or not. ...
    (comp.sys.transputer)