[Openmcl-devel] EXPT problem
Xiaofeng Yang
n.akr.akiiya at gmail.com
Fri Feb 8 02:53:18 PST 2013
I tried to let EXPT to result a very large number. But, when I use windows
x86, it signaled a type error `Error: The value 38580251 is not of the
expected type (UNSIGNED-BYTE 24).'(it seems that this error is signaled when
printing the result). My friend asked Gary Bayer about this, he said this
was caused by that the result is too large and it is not a bug. But I don't
understand that if it really caused by the result was too large, why not
signals a condition which named (e.g.) OUT-OF-RANGE or TOO-LARGE-NUMBER,
etc.
I tried this in windows x64, but it doesn't signal a type error now.
Instead, it seemed to crash by "The page file is too small, the operation
cannot be finished.", and could not get the backtrace.
I think it is better to signal a condition that the CCL's users can easily
understand what the problem actually is, directly from the condition, in
these situations.
--------------------- CCL 1.9 Windows x86 ------------------------
Welcome to Clozure Common Lisp Version 1.9-rc1-r15693 (WindowsX8632)!
? (expt 2 123456789)
> Error: The value 38580251 is not of the expected type (UNSIGNED-BYTE
24). <-- why the error is shown like this ?
> While executing: CCL::%PR-INTEGER, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b
*(2799A20) : 0 (%PR-INTEGER #<error printing object> 10 #<SYNONYM-STREAM to
*TER
MINAL-IO* #xC3405D6> NIL NIL) 1007
(2799A80) : 1 (WRITE-AN-INTEGER #<error printing object> #<SYNONYM-STREAM
to *T
ERMINAL-IO* #xC3405D6> 10 NIL) 255
(2799AA0) : 2 (%CALL-NEXT-METHOD (NIL #<CCL::STANDARD-KERNEL-METHOD
PRINT-OBJEC
T #> . 10380995)) 1007
(2799ADC) : 3 (%%STANDARD-COMBINED-METHOD-DCODE
(#<CCL::STANDARD-KERNEL-METHOD
PRINT-OBJECT :AROUND #> #<CCL::STANDARD-KERNEL-METHOD PRINT-OBJECT #>)
10380995)
623
(2799B18) : 4 (WRITE-A-FROB #<error printing object> #<SYNONYM-STREAM to
*TERMI
NAL-IO* #xC3405D6> 536870911 NIL) 151
(2799B54) : 5 (WRITE-INTERNAL #<SYNONYM-STREAM to *TERMINAL-IO* #xC3405D6>
#<er
ror printing object> 536870911 NIL) 679
(2799B84) : 6 (WRITE-1 #<error printing object> #<SYNONYM-STREAM to
*TERMINAL-I
O* #xC3405D6> 536870911) 527
(2799B98) : 7 (WRITE #<error printing object> :STREAM #<SYNONYM-STREAM to
*TERM
INAL-IO* #xC3405D6> :ESCAPE T :RADIX NIL :BASE 10 :CIRCLE NIL :PRETTY NIL
:LEVEL
NIL :LENGTH NIL :CASE :UPCASE :GENSYM T :ARRAY T :READABLY NIL
:RIGHT-MARGIN NI
L :MISER-WIDTH 40 :LINES NIL :PPRINT-DISPATCH #<PPRINT-DISPATCH-TABLE
#xC34488E>
:STRUCTURE T :SIMPLE-VECTOR NIL :SIMPLE-BIT-VECTOR NIL :STRING-LENGTH NIL)
1479
(2799D78) : 8 (TOPLEVEL-PRINT (#<error printing object>) #<SYNONYM-STREAM
to *T
ERMINAL-IO* #xC3405D6>) 463
(2799D94) : 9 (READ-LOOP :INPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO*
#xC340
6AE> :OUTPUT-STREAM #<SYNONYM-STREAM to *TERMINAL-IO* #xC3405D6>
:BREAK-LEVEL 0
:PROMPT-FUNCTION #<Compiled-function (:INTERNAL CCL::READ-LOOP)
(Non-Global) #x
44ABBA6>) 2071
(2799EBC) : 10 (RUN-READ-LOOP :BREAK-LEVEL 0) 183
(2799ED0) : 11 (TOPLEVEL-LOOP) 71
(2799ED8) : 12 (FUNCALL #'#<(:INTERNAL (TOPLEVEL-FUNCTION
(CCL::LISP-DEVELOPMEN
T-SYSTEM T)))>) 71
(2799EE8) : 13 (FUNCALL #'#<(:INTERNAL CCL::MAKE-MCL-LISTENER-PROCESS)>)
559
(2799F34) : 14 (RUN-PROCESS-INITIAL-FORM #<TTY-LISTENER listener(1)
[Active] #x
C33FD26> (#<COMPILED-LEXICAL-CLOSURE # #xC33FA5E>)) 639
(2799F78) : 15 (FUNCALL #'#<(:INTERNAL (CCL::%PROCESS-PRESET-INTERNAL
(PROCESS)
))> #<TTY-LISTENER listener(1) [Active] #xC33FD26>
(#<COMPILED-LEXICAL-CLOSURE #
#xC33FA5E>)) 519
(2799FCC) : 16 (FUNCALL #'#<(:INTERNAL
CCL::THREAD-MAKE-STARTUP-FUNCTION)>) 255
1 >
--------------------- CCL 1.9 Windows X64 ------------------------
Welcome to Clozure Common Lisp Version 1.9-rc1-r15694 (WindowsX8664)!
? (expt 2 22222222222)
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。 <-- means "The page file is
too small, the operation cannot be finished.", same as below
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。
> Error: Memory allocation request failed.
> While executing: CCL::%PR-INTEGER, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
1 > :b <--- cannot display the backtrace now
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。
CommitMemory VirtualAlloc: 0x5af 页面文件太小,无法完成操作。
> Error: Memory allocation request failed.
> While executing: CCL::%PR-INTEGER, in process listener(1).
> Type :POP to abort, :R for a list of available restarts.
> Type :? for other options.
2 >
Best regards,
Xiaofeng Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20130208/589f96c7/attachment.htm>
More information about the Openmcl-devel
mailing list