Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

0/0 Bug?

1 view
Skip to first unread message

Carlos Marangon

unread,
Dec 25, 1999, 3:00:00 AM12/25/99
to
Hello!

In my Emu 49 (YorkeM) with original ROM,
when I divide 0 by 0, in RPN mode, it returns an "?"
that I can say it is corerect, because O / 0 is a non known value.
In this case HP49 represents the non known value by an "?".

------------------

Please give more info about this bug you reported.

In article <946013157.790722@news1>,
"gibbons" <gib...@infonie.fr> wrote:
> Is there any hope of seeing the "0 divided by a 0-evaluating
expression returns 0" bug anytime soon in a Rom update ?
>
>

--
Carlos Marangon
Area48 - HP48/49 for beginners!
http://www.area48.com


Sent via Deja.com http://www.deja.com/
Before you buy.

Homer Simpson

unread,
Dec 25, 1999, 3:00:00 AM12/25/99
to
>In this case HP49 represents the non known value by an "?".


Yes, on the 49, the question mark is used to represent an undefined result
(the same way +infinity, infinity and - infinity are now used to represent
infinities, they are not interpreted as global names when you enter them on
the command line).

Homer Simpson
http://zap.to/hsimpson

Michael Metger

unread,
Dec 27, 1999, 3:00:00 AM12/27/99
to
can a test be done on the ? result for use in an IF structure

Michael Metger

"Homer Simpson" <hsam...@lemel.fr> wrote in message
news:84347s$b9$1...@front4m.grolier.fr...

Tom Sears

unread,
Dec 27, 1999, 3:00:00 AM12/27/99
to
Michael Metger wrote:

> can a test be done on the ? result for use in an IF structure
>
> Michael Metger
>

? == will return ?
But you can use ? SAME to return 1. or 0.
Tom


Tom Sears

unread,
Dec 27, 1999, 3:00:00 AM12/27/99
to
I wrote:

> ? == will return ?
> But you can use ? SAME to return 1. or 0.

I have a question on testing for ? myself: In a program
you can enter either ? or '?'. Is there any practical
difference other than the byte savings without the quotes?
'?' can't be used as a variable name (at least not normally)
so quoting doesn't appear to be necessary.

Thanks,
Tom


Homer Simpson

unread,
Dec 27, 1999, 3:00:00 AM12/27/99
to
>can a test be done on the ? result for use in an IF structure


Yes, use ? SAME to do so. It seems to work with == as well, provided that
you actually have two ? on the stack (else it returns ?).

Homer Simpson
http://zap.to/hsimpson

Homer Simpson

unread,
Dec 27, 1999, 3:00:00 AM12/27/99
to
>In a program
>you can enter either ? or '?'. Is there any practical
>difference other than the byte savings without the quotes?
[...]

>so quoting doesn't appear to be necessary.


I think quoting or not should never make any difference in UserRPL, since
'?' is evaluated to ? during execution (ie << '?' ? SAME >> returns 1.).

Homer Simpson
http://zap.to/hsimpson

Aaron Wallace

unread,
Dec 28, 1999, 3:00:00 AM12/28/99
to
perhaps if you had created an un-allowed var name '?' with system RPL, it may
(and probably will) recall the value in '?'

--
Aaron.

Homer Simpson

unread,
Dec 29, 1999, 3:00:00 AM12/29/99
to
>perhaps if you had created an un-allowed var name '?' with system RPL, it
may
>(and probably will) recall the value in '?'


That's why I said "UserRPL"...

>> I think quoting or not should never make any difference in UserRPL, since


Homer Simpson
http://zap.to/hsimpson

aven...@epita.fr

unread,
Dec 29, 1999, 3:00:00 AM12/29/99
to
Hello.

I guess ? only will be slower than '?'

When you call ?, it starts the ? program, so copy the program in memory
(it's a covered XLIB), run it and push himself embedded in a symbolic on
the stack after several tests (so many memory allocation).

'?' will simply push the symbolic on the stack, without memory
allocation (except if there is less than 2.5 bytes in RAM -> GARBAGE)

But it takes more space... Depending on the result you want to achieve,,

Jean-Yves

In article <848p0i$l5m$1...@front2m.grolier.fr>,


"Homer Simpson" <hsam...@lemel.fr> wrote:
> >In a program
> >you can enter either ? or '?'. Is there any practical
> >difference other than the byte savings without the quotes?
> [...]
> >so quoting doesn't appear to be necessary.
>

> I think quoting or not should never make any difference in UserRPL,
since

> '?' is evaluated to ? during execution (ie << '?' ? SAME >> returns
1.).
>
> Homer Simpson
> http://zap.to/hsimpson
>
>

Steen S. Schmidt

unread,
Dec 29, 1999, 3:00:00 AM12/29/99
to
>When you call ?, it starts the ? program, so copy the program in memory
>(it's a covered XLIB), run it and push himself embedded in a symbolic on
>the stack after several tests (so many memory allocation).

What does the ? "program" do? Is it capable of anything else than to push
'?'?
I thought '?' was only an object to signal undefined, not a command of
sorts.

Regards
Steen

Joseph K. Horn

unread,
Dec 30, 1999, 3:00:00 AM12/30/99
to
Oh, dear... this discussion is *way* off base...

Steen S. Schmidt wrote:

> What does the ? "program" do? Is it capable of anything else than to
> push '?'?
> I thought '?' was only an object to signal undefined, not a command of
> sorts.

Think of it EXACTLY like the built-in function pi, which unquoted is a
command, and which quoted is an algebraic object.

{ 2 pi 4 } SigmaLIST --> Error, since pi is a function here.
The above makes as much sense as { 2 TAN 4 } SigmaLIST.

BUT! Check *this* out:
{ 2 'pi' 4 } SigmaLIST --> '2+pi+4'
This works, just as would { 2 'TAN(3)' 4 } SigmaLIST.

'?' is NOT a name object, but an algebraic object. Just like 'pi'.
? is not a "signal" or error message, but a command. Just like pi.

-Joe-

Aaron Wallace

unread,
Dec 30, 1999, 3:00:00 AM12/30/99
to

Homer Simpson wrote:

> >perhaps if you had created an un-allowed var name '?' with system RPL, it
> may
> >(and probably will) recall the value in '?'
>
> That's why I said "UserRPL"...

right, but if the name was not created in that userrpl program, then you could
have problem - albeit, not that serious since you are using userrpl anyway.

> >> I think quoting or not should never make any difference in UserRPL

assuming that you know no un-allowed vars have been created in the current or
any parent directory. But, like you said, it won't cause much harm anyway
because you would likely have a STO directly after 'globalname' and (obviously)
it won't allow you to STO if it isn't a global name.

--
Aaron.


gibbons

unread,
Dec 31, 1999, 3:00:00 AM12/31/99
to
Of course 0/0 returns "?".
My original post referred to the bug I pointed out a couple weeks ago,
namely that (for example) 0 / '1/15-2/30' returns 0 and not "?"


Carlos Marangon <hp...@hotmail.com> wrote in message
news:841bpr$4ii$1...@nnrp1.deja.com...


> Hello!
>
> In my Emu 49 (YorkeM) with original ROM,
> when I divide 0 by 0, in RPN mode, it returns an "?"
> that I can say it is corerect, because O / 0 is a non known value.

> In this case HP49 represents the non known value by an "?".
>

> ------------------
>
> Please give more info about this bug you reported.
>
> In article <946013157.790722@news1>,
> "gibbons" <gib...@infonie.fr> wrote:
> > Is there any hope of seeing the "0 divided by a 0-evaluating
> expression returns 0" bug anytime soon in a Rom update ?
> >
> >
>
> --
> Carlos Marangon
> Area48 - HP48/49 for beginners!
> http://www.area48.com
>
>

0 new messages