Expon bug in wp34s
#1

Quote:
1 [sto] J
0 [sto] K
1 [chs] Expon

returns -1.71828182846 instead of correct 0.

I tried to correct it but failed to find code for Expon. I found the distributions.wp34s in xrom folder, but Expon is not there. Where is it?

#2

Look in xrom/distributions/exponential.wp34s.

#3

Here is a patch (I kind of tested it by building, flashing and trying).

Index: trunk/xrom/distributions/exponential.wp34s

===================================================================

--- trunk/xrom/distributions/exponential.wp34s (revision 3429)

+++ trunk/xrom/distributions/exponential.wp34s (working copy)

@@ -55,6 +55,8 @@

SPEC?
JMP cdf_infinite
[times]
+ x<0?
+ JMP ret_0
+/-
e[^x]-1
+/-
@@ -70,7 +72,6 @@

xOUT xOUT_NORMAL

expon_param:: RCL J
- GSB check_special_pos
- RTN
+ JMP check_special_pos


#4

Since I was there, I think that similar bug in Expon_u should also be fixed.
I tried this one in console emulator.

Index: trunk/xrom/distributions/exponential.wp34s
===================================================================
--- trunk/xrom/distributions/exponential.wp34s (revision 3429)
+++ trunk/xrom/distributions/exponential.wp34s (working copy)
@@ -43,6 +43,8 @@
SPEC?
JMP cdf_infinite
[times]
+ x<0?
+ JMP ret_1
+/-
e[^x]
xOUT xOUT_NORMAL
@@ -55,6 +57,8 @@
SPEC?
JMP cdf_infinite
[times]
+ x<0?
+ JMP ret_0
+/-
e[^x]-1
+/-
@@ -70,7 +74,6 @@
xOUT xOUT_NORMAL

expon_param:: RCL J
- GSB check_special_pos
- RTN
+ JMP check_special_pos


Edited: 13 July 2013, 5:01 p.m.

#5

Thanks for this. Patch applied now.


- Pauli

#6

I am not sure what happened, but when I updated from SVN, the Expon_u became this:

		XLBL"CDFU_EXPON"
xIN MONADIC
GSB expon_param
SPEC?
JMP cdf_infinite
x<0?
JMP ret_1
[times]
x<0?
JMP ret_1
+/-
e[^x]
xOUT xOUT_NORMAL

the first instance "x<0? jmp ret_1" (right before [times]) was not in the patch and should not be there.

#7

Hopefully fixed now.

I had to manually apply the patch -- the patch program didn't like me.


Pauli

#8

I've uploaded a new build to SVN. It should fix the RUN vs STOP issue, too.



Possibly Related Threads…
Thread Author Replies Views Last Post
  wp34s binomial bug Andrew Nikitin 4 1,861 09-22-2013, 05:20 PM
Last Post: Paul Dale
  another wp34s bug Andrew Nikitin 8 2,588 06-26-2013, 01:01 AM
Last Post: Paul Dale
  weird statistics bug in wp34s Andrew Nikitin 5 2,192 06-20-2013, 01:54 PM
Last Post: Namir
  [WP34S] A funny bug in Pi (prod) Eduardo Duenez 3 1,482 01-28-2013, 03:41 AM
Last Post: Walter B
  [WP34s] Bug or feature? Dieter 25 6,892 01-03-2013, 06:20 PM
Last Post: Paul Dale
  [WP34S] WP34S firmware on the AT91SAM7L-STK dev kit? jerome ibanes 1 1,246 10-04-2012, 04:59 PM
Last Post: Paul Dale
  Bug in WP34S? Namir 5 2,004 08-05-2012, 06:32 PM
Last Post: Namir
  [WP34S] Curious Bug in Inverse Normal Function Les Wright 61 13,357 05-01-2012, 02:44 AM
Last Post: Paul Dale
  WP34s: Complex AGM (Bug...) Eduardo Duenez 33 7,765 04-23-2012, 05:59 PM
Last Post: Paul Dale
  WP34S: Fractions (Bug?) Eduardo Duenez 1 978 04-22-2012, 08:42 PM
Last Post: Paul Dale

Forum Jump: