Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #59717
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: FP-Number Ambiguities |
| Date | 2017-05-22 11:43 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2017May22.134303@mips.complang.tuwien.ac.at> (permalink) |
| References | <5fa5c564-0e26-4a1b-8236-3d240449b29d@googlegroups.com> <2017May20.125641@mips.complang.tuwien.ac.at> <c9d38aae-76ff-4bd1-9266-cb18161dfd90@googlegroups.com> <2017May21.165944@mips.complang.tuwien.ac.at> <db12b0d8-5560-410d-9a29-6a37b6016f14@googlegroups.com> |
minforth@arcor.de writes:
>Am Sonntag, 21. Mai 2017 17:13:15 UTC+2 schrieb Anton Ertl:
>> minforth@arcor.de writes:
>> >well-behaving to legacy code
>>
>> If I load a legacy program containing "1.03" on a system with
>> CORE+DOUBLE+FLOAT, the program gets a float, while it expects a
>> double. I.e., not at all well-behaved.
>>
>
>The standard 8.3.1 speaks only of the trailing decimal point, so 1.03
>is not strictly a double number.
The standard has no say on legacy programs. That's why they are
called legacy programs, not standard programs.
>I know that older "dinosaaur" Forths treated 1.03 as double number.
Popular current Forth systems are "dinosaur" Forths in your
terminology:
[b8:~:16357] vfxlin include /usr/local/VfxLinEval/Lib/x86/Ndp387.fth
VFX Forth
Version: 4.72 [build 0560]
Build date: 27 September 2016
Including /usr/local/VfxLinEval/Lib/x86/Ndp387.fth
1.03 d. 103 ok
[b8:~:16358] sf include %SwiftForth/lib/options/fpmath.f.fth
ok
1.03 d. 103 ok
[b8:~:16359] ~/gforth/gforth
Gforth 0.7.9_20170406, Copyright (C) 1995-2016 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `help' for basic help
1.03 d.
*terminal*:1:1: '1.03' is a double-cell integer; type `help' for more info103 ok
>So the question is: who shoulkd rule?
>a) dinosaurs: 1.03 is a double number
>b) the standard: 1.03 is ambiguous
>c) common sense: it's a float
>
>To leave 0. "in the blue" as you suggested is nonsense (pardon me).
It's the only good way I see to getting to the situation that you
claim is common sense. Having "0." as double, and "1.03" as float is
even more confusing than having both as double.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2017: http://www.euroforth.org/ef17/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
FP-Number Ambiguities minforth@arcor.de - 2017-05-19 14:06 -0700
Re: FP-Number Ambiguities anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-20 10:56 +0000
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-20 11:50 -0700
Re: FP-Number Ambiguities anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-21 14:59 +0000
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-21 12:08 -0700
Re: FP-Number Ambiguities mhx@iae.nl - 2017-05-21 12:50 -0700
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-21 15:04 -0700
Re: FP-Number Ambiguities anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-22 11:43 +0000
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-22 06:40 -0700
Re: FP-Number Ambiguities albert@cherry.spenarnc.xs4all.nl (Albert van der Horst) - 2017-05-22 16:33 +0200
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-22 08:34 -0700
Double numbers and floats in the text interpreter (was: FP-Number...) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-22 16:17 +0000
Re: FP-Number Ambiguities pahihu <pahihu@gmail.com> - 2017-05-24 10:19 -0700
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-24 11:21 -0700
Re: FP-Number Ambiguities pahihu <pahihu@gmail.com> - 2017-05-24 12:13 -0700
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-24 13:12 -0700
Re: FP-Number Ambiguities (answer imported from future) Jan Coombs <jenfhaomndgfwutc@murmic.plus.com> - 2017-05-20 22:54 +0100
Re: FP-Number Ambiguities "HAA" <someone@microsoft.com> - 2017-05-24 17:21 +1000
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-24 01:11 -0700
Re: FP-Number Ambiguities "HAA" <someone@microsoft.com> - 2017-05-25 12:28 +1000
Re: FP-Number Ambiguities minforth@arcor.de - 2017-05-25 00:36 -0700
csiph-web