Post Reply 
format() Causes Crash, and limited to below 100?
06-24-2021, 05:04 PM (This post was last modified: 06-24-2021 05:10 PM by matalog.)
Post: #1
format() Causes Crash, and limited to below 100?
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?
Find all posts by this user
Quote this message in a reply
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
06-25-2021, 12:09 PM
Post: #3
RE: format() Causes Crash, and limited to below 100?
(06-25-2021 04:27 AM)Joe Horn Wrote:  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.

Not a bug??? Anything that causes the calculator to crash is a bug, IMHO. An error message? Sure, but never a reboot or lockup.

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
06-25-2021, 11:22 PM
Post: #4
RE: format() Causes Crash, and limited to below 100?
(06-25-2021 12:09 PM)toml_12953 Wrote:  Not a bug??? Anything that causes the calculator to crash is a bug, IMHO. An error message? Sure, but never a reboot or lockup.

You are certainly correct, if we accept Wikipedia's definition of "bug": "A software bug is an error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways."

I had been thinking of another definition of "bug", namely, "behavior contrary to the documentation." Back in the PPC days, Bill Wickes made an impassioned argument for defining "bug" that way, and calling any other unfortunate behavior an "anomaly". He just wanted to acknowledge that this distinction is important. Much discussion ensued. When all was said and done, much was said and nothing was done. So I'll agree with you on this one, and I hope that HP fixes this bug. Smile

<0|ɸ|0>
-Joe-
Visit this user's website Find all posts by this user
Quote this message in a reply
06-26-2021, 02:53 AM
Post: #5
RE: format() Causes Crash, and limited to below 100?
(06-25-2021 11:22 PM)Joe Horn Wrote:  
(06-25-2021 12:09 PM)toml_12953 Wrote:  Not a bug??? Anything that causes the calculator to crash is a bug, IMHO. An error message? Sure, but never a reboot or lockup.

You are certainly correct, if we accept Wikipedia's definition of "bug": "A software bug is an error, flaw or fault in a computer program or system that causes it to produce an incorrect or unexpected result, or to behave in unintended ways."

I had been thinking of another definition of "bug", namely, "behavior contrary to the documentation." Back in the PPC days, Bill Wickes made an impassioned argument for defining "bug" that way, and calling any other unfortunate behavior an "anomaly". He just wanted to acknowledge that this distinction is important. Much discussion ensued. When all was said and done, much was said and nothing was done. So I'll agree with you on this one, and I hope that HP fixes this bug. Smile

That's quite a phrase! I like it and will certainly use it in the future. It actually is a good summary of a whole lot of topics discussed daily, here and elsewhere...

Thanks Joe! Smile

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
06-26-2021, 03:59 PM
Post: #6
RE: format() Causes Crash, and limited to below 100?
(06-25-2021 11:22 PM)Joe Horn Wrote:  definition of "bug", namely, "behavior contrary to the documentation."

By this definition HP could provide a bug free calculator simply by providing no documentation. Smile

-road
Find all posts by this user
Quote this message in a reply
06-26-2021, 04:40 PM
Post: #7
RE: format() Causes Crash, and limited to below 100?
[Image: 2020_01_Romain_Garrouste_Printemps_silen...k=1IOMl4ru]

There is so much different bugs, that stating only one universal definition is a hard task...
Find all posts by this user
Quote this message in a reply
06-26-2021, 10:12 PM
Post: #8
RE: format() Causes Crash, and limited to below 100?
(06-26-2021 03:59 PM)roadrunner Wrote:  
(06-25-2021 11:22 PM)Joe Horn Wrote:  definition of "bug", namely, "behavior contrary to the documentation."

By this definition HP could provide a bug free calculator simply by providing no documentation. Smile

-road

Big Grin Big Grin Big Grin

Problem solved!

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
06-26-2021, 10:15 PM
Post: #9
RE: format() Causes Crash, and limited to below 100?
(06-26-2021 04:40 PM)C.Ret Wrote:  There is so much different bugs, that stating only one universal definition is a hard task...

Most of those are insects, not bugs!

https://www.clarkexterminating.com/blog/...difference

Tom L
Cui bono?
Find all posts by this user
Quote this message in a reply
06-26-2021, 10:48 PM (This post was last modified: 06-26-2021 10:52 PM by Liamtoh Resu.)
Post: #10
RE: format() Causes Crash, and limited to below 100?
A friend of mine once referred to me as being both errudite and the
king of non-sequitors. I can also pun-nish my friends.
I have seen many answers preceeded by "That's a very good question."

Now I have a sense of humor but ...

So I am still waiting for the positive or negative response to the original
post that does not mention bug, feature, or insect.

Original post:

Quote:format() Causes Crash, and limited to below 100?
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?

Cheers.
Find all posts by this user
Quote this message in a reply
06-27-2021, 01:08 AM
Post: #11
RE: format() Causes Crash, and limited to below 100?
(06-24-2021 05:04 PM)matalog Wrote:  I assume that the use of format() is limited to below 99 digits then?

Limit is smaller than 99
Tried on HP Prime emulator, build 2.1.14181 (2018 10 16)

CAS> format(1.23e−45, "f74")       → CRASH
Find all posts by this user
Quote this message in a reply
06-27-2021, 02:22 AM
Post: #12
RE: format() Causes Crash, and limited to below 100?
The original computer bug was a dead moth. Does the prime have a dead moth!!!
Find all posts by this user
Quote this message in a reply
06-27-2021, 04:36 AM (This post was last modified: 06-27-2021 04:38 AM by C.Ret.)
Post: #13
RE: format() Causes Crash, and limited to below 100?
(06-26-2021 10:15 PM)toml_12953 Wrote:  
(06-26-2021 04:40 PM)C.Ret Wrote:  There is so much different bugs, that stating only one universal definition is a hard task...

Most of those are insects, not bugs!

https://www.clarkexterminating.com/blog/...difference

Thanks for the info. That's true, I forgot the difference between bugs and insect. In French we have no word to distinct bugs from insects, we need to use specialize terms from entomologists.

[Image: bugs.jpg]
Find all posts by this user
Quote this message in a reply
06-27-2021, 07:43 AM (This post was last modified: 06-27-2021 01:35 PM by StephenG1CMZ.)
Post: #14
RE: format() Causes Crash, and limited to below 100?
Also https://www.google.co.uk/search?q=define...ent=safari

Just for the benefit of those learning English, that pest website is wrong to say all bugs are insects.

We might also say “he’s caught a bug” to refer to an unspecified infection, caused by some bacteria rather than an insect. (I guess The computer equivalent to that usage might be “that bug is a virus”).

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
06-27-2021, 11:02 AM
Post: #15
RE: format() Causes Crash, and limited to below 100?
INABIAF
or https://www.wired.com/story/its-not-a-bu...a-feature/
OT:
http://tecfaetu.unige.ch/staf/staf-e/del...virus.html
/OT
Find all posts by this user
Quote this message in a reply
01-02-2024, 10:50 PM
Post: #16
RE: format() Causes Crash, and limited to below 100?
I created (in the bug tracker I’ve set up, to help organize development) a ticket for format(1E-24,”f88”) bringing about a crash … and the bug got fixed! Big Grin
Find all posts by this user
Quote this message in a reply
01-03-2024, 07:23 AM
Post: #17
RE: format() Causes Crash, and limited to below 100?
This is a Schrödinger case: it’s a bug because it has been corrected, it’s not a bug because it has been corrected.

Thibault - not collector but in love with the few HP models I own - Also musician : http://walruspark.co
Find all posts by this user
Quote this message in a reply
01-03-2024, 10:38 AM
Post: #18
RE: format() Causes Crash, and limited to below 100?
(01-02-2024 10:50 PM)jte Wrote:  I created (in the bug tracker I’ve set up, to help organize development) a ticket for format(1E-24,”f88”) bringing about a crash … and the bug got fixed! Big Grin

That’s great to see all these bugs reported on the forum being fixed, but it would be even better to get a new Prime firmware release with all these bug fixes ! Wink
Find all posts by this user
Quote this message in a reply
01-03-2024, 05:24 PM
Post: #19
RE: format() Causes Crash, and limited to below 100?
(01-03-2024 10:38 AM)Didier Lachieze Wrote:  
(01-02-2024 10:50 PM)jte Wrote:  I created (in the bug tracker I’ve set up, to help organize development) a ticket for format(1E-24,”f88”) bringing about a crash … and the bug got fixed! Big Grin

That’s great to see all these bugs reported on the forum being fixed, but it would be even better to get a new Prime firmware release with all these bug fixes ! Wink

+1

Prime, 15C CE
Find all posts by this user
Quote this message in a reply
01-03-2024, 05:36 PM
Post: #20
RE: format() Causes Crash, and limited to below 100?
Quote:That’s great to see all these bugs reported on the forum being fixed, but it would be even better to get a new Prime firmware release with all these bug fixes ! Wink

+1
Et quelques nouveautés aussi, sinon un jour il n'y aura plus de bugs à corriger Smile

And a few new features too, otherwise one day there won't be any more bugs to fix Smile

Sorry for my english
Find all posts by this user
Quote this message in a reply
Post Reply 




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