[its-hackers] Found an error in MUDDLE'S parsing Foating point numbers !!!

Eric Swenson eric at swenson.org
Thu Jul 15 18:45:16 CEST 2021


I have versions of MUD54, MUD55, and MUD56 on ES.  I just tried your test case in all three:

 

ES*:mudsav;mud54

MUDDLE 54 IN OPERATION.

LISTENING-AT-LEVEL 1 PROCESS 1

<SET FOO .1>◊

0.09999999

 

762216)   XCT 35(2)   ◊↑X. EMACS◊J

ES*:mudsav;mud55

MUDDLE 55 IN OPERATION.

LISTENING-AT-LEVEL 1 PROCESS 1

<SET FOO .1>◊

0.09999999

 

764216)   XCT 35(2)   ◊↑X. EMACS◊J

ES*:mudsav;mud56

MUDDLE 56 IN OPERATION.

LISTENING-AT-LEVEL 1 PROCESS 1

<SET FOO .1>◊

 

*ERROR*

UNBOUND-VARIABLE

\1

LVAL

LISTENING-AT-LEVEL 2 PROCESS 1

 

So something is broken in MUD56.  Note:  MUD54 and MUD55 (above) were built on DM, restored from backup tapes, and loaded on ES.  MUD56 was built by us (in the 21st century) from sources and assumptions.

 

-- Eric

 

From: Richard Shiffman <rrs0 at earthlink.net>
Date: Wednesday, July 14, 2021 at 6:28 PM
To: Chris Reeve <chrisxreeve at gmail.com>
Cc: Lars Brinkhoff <lars at nocrew.org>, Eric Swenson <eric at swenson.org>, Bjorn Victor <bjorn at victor.se>, Its Hackers <its-hackers at its.victor.se>
Subject: Re: Found an error in MUDDLE'S parsing Foating point numbers !!!

 

Hi Chris, Lars, and everyone,

Lars is correct in muddle 54

".1$" parses to the number "0.09999...9" .




Please log out when your are done.                                              

rrs$u                                                                           

:TCTYP VT52 NO UP                                                               

:KILL                                                                      mud54$^K!                                                                       

MUDDLE 54 IN OPERATION.MUDDLE INIT                                              

PPRINT? (Y OR N) space is yes too /PPRINT/FRAMES                                

LISTENING-AT-LEVEL 1 PROCESS 1

1$                                                

1                                                                               

<SET FOO .1>$ 

 0.09999999                                                                      

 From what I remember ".1$" worked in the muddle 104 & 106 at USC ISIB and ISIE also. These were real DEC hardware running twinex. 

 

I guess it comes down to a matter of semantics 

As to whether a floating point number is

/\d*.\d+/ or /\d+.\d+/ .

 

Rick 

 

Sent from my iPhone




On Jul 14, 2021, at 12:32 PM, Chris Reeve <chrisxreeve at gmail.com> wrote:



I was reading my MDL Programming Language. It may say a floating point number requires digits before '.'. I quote:

 

"Decimal-Point" notation for a FLOAT consists of an arbitrarily long string of digits containing one . (period) which is followed by at least one digit.

 

It depends on whether arbitrarily long includes none.

 

-clr

 

 

On Tue, Jul 13, 2021 at 11:02 PM rrs0 at earthlink.net <rrs0 at earthlink.net> wrote:

Below is is the typescript my telnet session with muddle 56 on Lars's KA-10 simulator
Running ITS and Muddle. If you input to the read-eval-print loop ".1$" you get 
*ERROR*
UNBOUND-VARIABLE
\1
LVAL
LISTENING-AT-LEVEL 2 PROCESS 1<FRAMES>$

1 LVAL  [\1]
2 EVAL  [.\1]
3 LISTEN        []TOPLEVEL
<ERRET>$

"0.1 parses to 0.1

".10" parses to 0.01 and 
".1234$" parses to .234   a big error!
"0.1234" parses to 0.1234



------------------------------------------------------------------------------------------------------------------------------------------------------------------
[Ricks-Air:~] rrs% telnet its.pdp10.se 10003
Trying 88.99.191.74...
Connected to its.pdp10.se.
Escape character is '^]'.


Connected to the KA-10 simulator MTY device, line 2

TT ITS.1650. DDT.1547.
TTY 23
3. Lusers, Fair Share = 100%
THIS IS TT ITS, A HIGHTY VOLATILE SYSTEM FOR TESTING

For brief information, type ?
For a list of colon commands, type :? and press Enter.
For the full info system, type :INFO and Enter.

You may have to set the correct terminal type.
Try :TCTYP AAA or :TCTYP DATAPOINT

PLEASE LOG IN!  Type ":login", your name, and Enter.
Please log out when your are done.
rrs$u
:TCTYP VT52 NO UP
:KILL
*..DELWRN/   1   1
..CLOBRF/   0   1

w^K!
T21 LARS  
T22 CROCK 
T23 RRS   D51 TARAKA

:KILL 
*mdl$^K!
MUDDLE 56 IN OPERATION.MUDDLE INIT
PPRINT? (Y OR N) space is yes too /PPRINT/FRAMES
LISTENING-AT-LEVEL 1 PROCESS 1
<FLOAD "ITSPKG >">$
"DONE"
<USE "F">$
USE
<F 3> <F 4>$
6

24


.1$

*ERROR*
UNBOUND-VARIABLE
\1
LVAL
LISTENING-AT-LEVEL 2 PROCESS 1<FRAMES>$

1 LVAL  [\1]
2 EVAL  [.\1]
3 LISTEN        []TOPLEVEL
<ERRET>$

LISTENING-AT-LEVEL 1 PROCESS 1
.10$
0.0000000
.1234$
0.23399999

0.1$
0.09999999
0.1234$
0.12339999

1$
1
.2$

*ERROR*
UNBOUND-VARIABLE
\2LVAL
LISTENING-AT-LEVEL 2 PROCESS 1
<FRAMES>$

1 LVAL  [\2]
2 EVAL  [.\2]
3 LISTEN        []TOPLEVEL
<ERRET>$

LISTENING-AT-LEVEL 1 PROCESS 1

................................................................................

It seems that the string /\.d/ parses to  the LVAL of the ATOM who's named "\\\d" and
The string /.\d\d\d/ parses to the Float  /\d\d . This is Not Correct!

/0.\d/ parses to the float 0.\d which is correct.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://its.victor.se/pipermail/its-hackers_its.victor.se/attachments/20210715/8e9385a8/attachment.html>


More information about the its-hackers mailing list