Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #1610

Re: Printing a floating point number

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail
From jsgraham <jsgrahamus@yahoo.com>
Newsgroups comp.lang.forth
Subject Re: Printing a floating point number
Date Thu, 28 Apr 2011 00:49:44 -0600
Organization Aioe.org NNTP Server
Lines 26
Message-ID <ipb2m8$3em$1@speranza.aioe.org> (permalink)
References <ip9pl6$a93$1@speranza.aioe.org> <4db88103.104803156@192.168.0.50>
NNTP-Posting-Host 9evsG9G7IonFPlwRJIp/og.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.18) Gecko/20110320 SeaMonkey/2.0.13
X-Notice Filtered by postfilter v. 0.8.2
Xref x330-a1.tempe.blueboxinc.net comp.lang.forth:1610

Show key headers only | View raw


Stephen Pelc wrote:
> On Wed, 27 Apr 2011 13:09:24 -0600, jsgraham<jsgrahamus@yahoo.com>
> wrote:
>
>> How does one do this in Forth?  I have VFX Forth and I pushed 3.14 onto
>> the stack and tried executing F., for which I got an UNDEFINED WORD error.
>>
>> I know I'm missing something simple here.
>
> There are three floating point packs for VFX Forth, so you have to
> select which one to use. In nearly all cases, Lib\Ndp387.fth is the
> best choice. Assuming that the LIB macro is set up:
>
>    include %lib%\Ndp387
>    3.14e0 f.
>
> In order to prevent parsing issues, specifying an exponent is good
> practice.
>
> Stephen
>

Is there a way to print a float in a base other 10?


Steve

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Printing a floating point number jsgraham <jsgrahamus@yahoo.com> - 2011-04-27 13:09 -0600
  Re: Printing a floating point number mhx@iae.nl (Marcel Hendrix) - 2011-04-27 22:03 +0200
  Re: Printing a floating point number stephenXXX@mpeforth.com (Stephen Pelc) - 2011-04-27 20:52 +0000
    Re: Printing a floating point number jsgraham <jsgrahamus@yahoo.com> - 2011-04-27 15:47 -0600
    Re: Printing a floating point number jsgraham <jsgrahamus@yahoo.com> - 2011-04-28 00:49 -0600
      Re: Printing a floating point number stephenXXX@mpeforth.com (Stephen Pelc) - 2011-04-28 09:13 +0000
        Re: Printing a floating point number mhx@iae.nl (Marcel Hendrix) - 2011-04-28 21:08 +0200

csiph-web