Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: "James Giles" <jamesgiles@xxxxxxxxxxxxxxxx>
- Date: Fri, 09 Dec 2005 06:18:17 GMT
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
.
- Follow-Ups:
- References:
- WMS FORTRAN: what are SIND, COSD, etc?
- From: wob96
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: John Doe
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: robert . corbett
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: John Doe
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: Ron Shepard
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: Rich Townsend
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: James Giles
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: glen herrmannsfeldt
- Re: WMS FORTRAN: what are SIND, COSD, etc?
- From: kia
- WMS FORTRAN: what are SIND, COSD, etc?
- Prev by Date: Re: Compaq Visual Fortran discontinued: upgrade to Intel Visual Fortran?
- Next by Date: Re: Compaq Visual Fortran discontinued: upgrade to Intel Visual Fortran?
- Previous by thread: Re: WMS FORTRAN: what are SIND, COSD, etc?
- Next by thread: Re: WMS FORTRAN: what are SIND, COSD, etc?
- Index(es):
Relevant Pages
|
Loading