Expon bug in wp34s



#2

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?


#3

Look in xrom/distributions/exponential.wp34s.


#4

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


#5

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.


#6

Thanks for this. Patch applied now.


- Pauli


#7

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.


#8

Hopefully fixed now.

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


Pauli


#9

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 580 09-22-2013, 05:20 PM
Last Post: Paul Dale
  another wp34s bug Andrew Nikitin 8 908 06-26-2013, 01:01 AM
Last Post: Paul Dale
  weird statistics bug in wp34s Andrew Nikitin 5 801 06-20-2013, 01:54 PM
Last Post: Namir
  [WP34S] A funny bug in Pi (prod) Eduardo Duenez 3 593 01-28-2013, 03:41 AM
Last Post: Walter B
  [WP34s] Bug or feature? Dieter 25 2,004 01-03-2013, 06:20 PM
Last Post: Paul Dale
  [WP34S] WP34S firmware on the AT91SAM7L-STK dev kit? jerome ibanes 1 425 10-04-2012, 04:59 PM
Last Post: Paul Dale
  Bug in WP34S? Namir 5 653 08-05-2012, 06:32 PM
Last Post: Namir
  [WP34S] Curious Bug in Inverse Normal Function Les Wright 61 3,295 05-01-2012, 02:44 AM
Last Post: Paul Dale
  WP34s: Complex AGM (Bug...) Eduardo Duenez 33 2,485 04-23-2012, 05:59 PM
Last Post: Paul Dale
  WP34S: Fractions (Bug?) Eduardo Duenez 1 307 04-22-2012, 08:42 PM
Last Post: Paul Dale

Forum Jump: