At 11:23 19-11-2000 -1000, you wrote:
>> Date: Fri, 17 Nov 2000 19:13:22 +0010
>> From: [log in to unmask]
>
< snipped >
>> >> >"dble" may require a function evaluation. 3.1541926d0 does not.
>> >>
>> >> Why? Do you know any compiler that would
>> >
>> >Would what? Question us unclear.
>>
>> Would require a function evaluation.
>> >DBLE may be required for preparing an argument for
>> >a subroutine call or function reference. It may also be required to
force
>> >the evaluation of an expression to be done in double precision rather
>> >than in single precision.
>>
>> Yes, but I am still unclear as to why you believe any of these uses
should ever
>> require a function evaluation. Hoisting a single to a double precision
variable
>> should be doable without a function call.
>
>Function evaluation at the Fortran level, to be sure.
>Notice that I said "may require". You introduced "would".
>That's an implentation issue. Whether a compiler produces
>any code at all, inlines the conversion code, or -- as you suggest --
>invokes a function, is up the to the compiler designer.
>As for me, I ceased to be surprised at such ingenuities since
>discovering that a certain compiler invoked a subroutine call to
>convert an integer constant to floating point for the
>assignment "x = 1"
While we're talking about function avaluation ..
Wouldn't be nice to have an intrinsic procedure returning
result AND remainder of a division. Most hardware is capable of doing
this in one operation. Fortran normally needs two (or three), like
Q = a / b
R = mod(a, b) ! How is this implemented ?
or
Q = a / b
R = a - b * Q
I suppose it is too late now to put this into F200?
But library-writers are free to add it, isn't it?
--
Meilleures Salutations,
Kindest Regards,
/---
Jan van Oosterwijk
Computing Centre
Delft University of Technology
Postbus 354
2600 AJ Delft
Netherlands / Pays-Bas
mailto:[log in to unmask]
Phone: +31 15 27 85017
Fax: +31 15 27 83787
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|