qexo-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qexo-general] Problem with division


From: Per Bothner
Subject: Re: [Qexo-general] Problem with division
Date: Wed, 26 Mar 2003 23:14:35 -0800
User-agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3) Gecko/20030312

Seshukumar Venkata Adiraju wrote:
How do I round off the result to specific decimal places?

I don't know of any "official" way to do it, but you can
use the Kawa "format" function:

format(false(), "[~5,2f]", 5 div 3) -> "[ 1.67]"

See the Kawa manual (- or the Common Lisp specification/book).

It's likely that this will at some point require some
special namespace prefix, but for now it doesn't.
--
        --Per Bothner
address@hidden   http://per.bothner.com/






reply via email to

[Prev in Thread] Current Thread [Next in Thread]