Neatest way to make a ddecimal? 
Author Message
 Neatest way to make a ddecimal?

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;

James Anderson



Sat, 17 Jan 1998 03:00:00 GMT  
 Neatest way to make a ddecimal?

Quote:
>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


Phone: +44 (0)1273 678367 URL: http://www.cogs.susx.ac.uk/users/adrianh/



Sun, 18 Jan 1998 03:00:00 GMT  
 Neatest way to make a ddecimal?
How about just:

        number_coerce(foo, 0.0d0) -> bar;



Sun, 18 Jan 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Making Code Neat

2. Neater way of making indexes?

3. Neat Net Tricks

4. A Neat ALC Trick

5. Neat recursive menu program written in awk

6. Squeak is neat, but in hangs...

7. Neat tip from MS to show User and Computer Name

8. RGB.GIF Neat file with hex values for various colors

9. Neat Dictionary Utility

10. WinVIew colorizaton is neat

11. Fw: The public email gateway for Comp.lang.forth is neat

12. The public email gateway for Comp.lang.forth is neat

 

 
Powered by phpBB® Forum Software