Re: WMS FORTRAN: what are SIND, COSD, etc?



kia wrote:
>> Rich Townsend wrote:
>>
>> I disagree; I would be very happy if SIN(ACOS(-1.)) returns zero. Why
>> would that be an error?
>
> To answer that you'll need to dump your mail-in diploma and start
> working toward a real thing... in the meantime, here's your happy
> (Kodak) moment (courtesy CVF)
>
> external sin
> data x/-1/
> print*, sin(acos(x))
> end
> cvf: 0.0000000E+00
>
> albeit brief, as I let you fill in the details for remastering the
> sin() to match its mathematical expectations.

Evidently you have an external function that happens to have
the same name as the SIN intrinsic. No telling what it does.
But one thing is abundantly clear about it: it clearly *doesn't*
compute the trigonometric sine of its argument. In all floating-
point implementations where CVF runs, there's no representable
number in the neighborhood of ACOS(-1.0) whose trigonometric
sine is zero - or even sufficiently close to zero to print as zero.

--
J. Giles

"I conclude that there are two ways of constructing a software
design: One way is to make it so simple that there are obviously
no deficiencies and the other way is to make it so complicated
that there are no obvious deficiencies." -- C. A. R. Hoare


.



Relevant Pages

  • Re: WMS FORTRAN: what are SIND, COSD, etc?
    ... I would be very happy if SIN) returns zero. ... since the SIN function have no way of detecting where its ... To do otherwise complicates ... no deficiencies and the other way is to make it so complicated ...
    (comp.lang.fortran)
  • Re: sin x / x tends to 1...
    ... Darren J Wilkinson wrote: ... > I've a question about the limit of sin x / x as x tends to zero. ... Regards ...
    (sci.math)
  • Re: opponents of taylor and lhospital ?
    ... limit as x goes to zero of (sin x) over x. ... The objection is that to use l'Hopital, ... How does one develop the taylor series for sine without knowing how ...
    (sci.math)
  • Re: limit of a special succession
    ... If a < 0 the limit is zero. ... how close does sin n come to zero ... a subsequence going to zero, ... going to infinity. ...
    (sci.math)
  • Re: WMS FORTRAN: what are SIND, COSD, etc?
    ... > sine is zero - or even sufficiently close to zero to print as zero. ... CVF does it, but it managed easily with but a little help. ... doing *applied* numerics might. ...
    (comp.lang.fortran)

Loading