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


Groups > comp.lang.forth > #1610

Re: Printing a floating point number

From jsgraham <jsgrahamus@yahoo.com>
Newsgroups comp.lang.forth
Subject Re: Printing a floating point number
Date 2011-04-28 00:49 -0600
Organization Aioe.org NNTP Server
Message-ID <ipb2m8$3em$1@speranza.aioe.org> (permalink)
References <ip9pl6$a93$1@speranza.aioe.org> <4db88103.104803156@192.168.0.50>

Show all headers | 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