In article <3vl3te$kp0@susscsc1.rdg.ac.uk>, James Anderson <jadwa> wrote:
>I am using number_coerce quite a lot these days. Is there a neater
>way of doing a conversion to ddecimal than this:
>
> uses float_parameters;
> lconstant ddecimal = pop_most_positive_ddecimal;
>
> number_coerce(foo, ddecimal) -> bar;
Well, you can save the reference to LIB * FLOAT_PARAMETERS by creating a
ddecimal directly (see the section on FP numbers in REF * ITEMISE).
number_coerce(foo, 1.0d0)
(of course, if your always after ddecimals you could alter -popdprecision-
appropriately)
Adrian
aids (adrianh@cogs.susx.ac.uk) ObDisclamer: Poplog used to pay my wages
Phone: +44 (0)1273 678367 URL: http://www.cogs.susx.ac.uk/users/adrianh/
|