HP Forums
format() Causes Crash, and limited to below 100? - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: format() Causes Crash, and limited to below 100? (/thread-17162.html)

Pages: 1 2


format() Causes Crash, and limited to below 100? - matalog - 06-24-2021 05:04 PM

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?


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

(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.


RE: format() Causes Crash, and limited to below 100? - toml_12953 - 06-25-2021 12:09 PM

(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.


RE: format() Causes Crash, and limited to below 100? - Joe Horn - 06-25-2021 11:22 PM

(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


RE: format() Causes Crash, and limited to below 100? - rprosperi - 06-26-2021 02:53 AM

(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


RE: format() Causes Crash, and limited to below 100? - roadrunner - 06-26-2021 03:59 PM

(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


RE: format() Causes Crash, and limited to below 100? - C.Ret - 06-26-2021 04:40 PM

[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...


RE: format() Causes Crash, and limited to below 100? - toml_12953 - 06-26-2021 10:12 PM

(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!


RE: format() Causes Crash, and limited to below 100? - toml_12953 - 06-26-2021 10:15 PM

(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/bug-vs-insect-whats-the-difference


RE: format() Causes Crash, and limited to below 100? - Liamtoh Resu - 06-26-2021 10:48 PM

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.


RE: format() Causes Crash, and limited to below 100? - Albert Chan - 06-27-2021 01:08 AM

(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


RE: format() Causes Crash, and limited to below 100? - Dougggg - 06-27-2021 02:22 AM

The original computer bug was a dead moth. Does the prime have a dead moth!!!


RE: format() Causes Crash, and limited to below 100? - C.Ret - 06-27-2021 04:36 AM

(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/bug-vs-insect-whats-the-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]


RE: format() Causes Crash, and limited to below 100? - StephenG1CMZ - 06-27-2021 07:43 AM

Also https://www.google.co.uk/search?q=define+bug&ie=UTF-8&oe=UTF-8&hl=en-gb&client=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”).


RE: format() Causes Crash, and limited to below 100? - Thomas_Sch - 06-27-2021 11:02 AM

INABIAF
or https://www.wired.com/story/its-not-a-bug-its-a-feature/
OT:
http://tecfaetu.unige.ch/staf/staf-e/delhom/hobbies/winvirus.html
/OT


RE: format() Causes Crash, and limited to below 100? - jte - 01-02-2024 10:50 PM

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


RE: format() Causes Crash, and limited to below 100? - pinkman - 01-03-2024 07:23 AM

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.


RE: format() Causes Crash, and limited to below 100? - Didier Lachieze - 01-03-2024 10:38 AM

(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


RE: format() Causes Crash, and limited to below 100? - chromos - 01-03-2024 05:24 PM

(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


RE: format() Causes Crash, and limited to below 100? - Tyann - 01-03-2024 05:36 PM

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