From: SourceForge.net <no...@so...> - 2003-05-16 00:33:53
|
Bugs item #726420, was opened at 2003-04-23 14:16 Message generated for change (Comment added) made by rtoy You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=726420&group_id=4933 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Barton Willis (willisb) Assigned to: Nobody/Anonymous (nobody) Summary: floats with missing exponents / really minor Initial Comment: Some software allows the exponent of a float to default to zero. In Maxima, this isn't the case (C1) 4.2d; (D1) 4.2D+ (C2) 4.2e; (D2) 4.2E+ (C3) ?print(%); 4.2E+ (D3) 4.2E+ (C4) 4.2b; Error: Unexpected end of #<string-input stream from "">. Fast links are on: do (si::use-fast-links nil) for debugging Error signalled by MACSYMA-TOP-LEVEL. Broken at MREAD-RAW. Type :H for Help. MAXIMA>> Maxima version: 5.9.0 Maxima build date: 19:10 2/9/2003 host type: i686-pc-mingw32 lisp-implementation-type: Kyoto Common Lisp lisp-implementation-version: GCL-2-5.0 Not really a bug, but ... Barton ---------------------------------------------------------------------- >Comment By: Raymond Toy (rtoy) Date: 2003-05-15 20:33 Message: Logged In: YES user_id=28849 I think the following replacement in nparse.lisp will catch these errors. Help pick out a better error message. (DEFUN SCAN-DIGITS (DATA CONTINUATION? CONTINUATION) (DO ((C (PARSE-TYIPEEK) (PARSE-TYIPEEK)) (L () (CONS C L))) ((NOT (ASCII-NUMBERP C)) (COND ((IMEMBER C CONTINUATION?) (FUNCALL CONTINUATION (LIST* (NCONS (FIXNUM-CHAR-UPCASE (PARSE-TYI))) (NREVERSE L) Data) )) ((null l) (merror "Incomplete number")) (T (MAKE-NUMBER (CONS (NREVERSE L) DATA))))) (PARSE-TYI))) ---------------------------------------------------------------------- Comment By: Raymond Toy (rtoy) Date: 2003-05-13 00:17 Message: Logged In: YES user_id=28849 I think the following replacement in nparse.lisp will catch these errors. Help pick out a better error message. (DEFUN SCAN-DIGITS (DATA CONTINUATION? CONTINUATION) (DO ((C (PARSE-TYIPEEK) (PARSE-TYIPEEK)) (L () (CONS C L))) ((NOT (ASCII-NUMBERP C)) (COND ((IMEMBER C CONTINUATION?) (FUNCALL CONTINUATION (LIST* (NCONS (FIXNUM-CHAR-UPCASE (PARSE-TYI))) (NREVERSE L) Data) )) ((null l) (merror "Incomplete number")) (T (MAKE-NUMBER (CONS (NREVERSE L) DATA))))) (PARSE-TYI))) ---------------------------------------------------------------------- Comment By: Barton Willis (willisb) Date: 2003-05-07 11:14 Message: Logged In: YES user_id=570592 Agreed, the internal error is a bug, and I agree that allowing the exponent to default to zero isn't a good thing. Should somebody fix this, all three inputs (C1) 4.2b; Error: Unexpected end of #<string-input stream from "">. Fast links are on: do (si::use-fast-links nil) for debugging Error signalled by MACSYMA-TOP-LEVEL. Broken at MREAD-RAW. Type :H for Help. MAXIMA>>:q (C1) 4.2d; (D1) 4.2D+ (C2) 4.2e; (D2) 4.2E+ should generate more or less the same (comphensible) error message. ---------------------------------------------------------------------- Comment By: Stavros Macrakis (macrakis) Date: 2003-05-05 18:01 Message: Logged In: YES user_id=588346 I don't see any good reason to allow "4.2d" etc. as a short form of "4.2d0". This is not supported by any programming language I know. What software allows this??? My guess is that it is either (1) some sort of very permissive user front- end; (2) a fixed format where spaces are interpreted as zeroes; or (3) an accident/bug of the implementation. On the other hand, the error message given is poor. It should give a normal syntax error, not an internal error. THAT is a bug. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=104933&aid=726420&group_id=4933 |