Post Reply 
format() Causes Crash, and limited to below 100?
06-25-2021, 04:27 AM
Post: #2
RE: format() Causes Crash, and limited to below 100?
(06-24-2021 05:04 PM)matalog Wrote:  I am using format() to add the leading zeroes to a number in CAS mode, and experimenting, I have found that if I enter:

format(Ans,"f99")

it will cause the Prime to reboot (G2 or G1), and

format(Ans,"f100")

reports "invalid format".

I assume that the use of format() is limited to below 99 digits then?

Fascinating! If the numeric input (first argument) is large (e.g. 1.23E24) then the second argument of format() can be up to "f99" without any problem. (Its parser rejects anything longer than 2 digits). But if the first argument is small (e.g. 1.23E-24) then it crashes. That's clearly unintended by HP, but it's not strictly speaking a bug, because the documentation nowhere explains the limits of the second parameter. Strange results can be obtained from random second arguments, such as "f2x". That's also not strictly a bug, since the documentation doesn't mention that either.

<0|ΙΈ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: format() Causes Crash, and limited to below 100? - Joe Horn - 06-25-2021 04:27 AM



User(s) browsing this thread: 1 Guest(s)