[WP34S] A funny bug in Pi (prod)
#1

Hi,

I was using my 34S flashed to recent 3350 calc-full.bin

I had never used the sum (Sigma) and product (Pi) functions.

I coded the identity function f(x)=x trivially:

LBL B
RTN

Then I tried adding 1+2+...+10 with Sigma:

1
[ENTER]
10
[SIGMA]
B

Output: 55 (correct).

Then tried to find 10! instead

1
[ENTER]
10
[PI]
B
Output: 0 (should be 10!=3628800)

There is a funny bug in the implementation of PI (product), but not in SIGMA.

Cheers,

Eduardo

#2

Both of these functions take one argument from the stack which is a loop index for the DSL instruction. In both cases you are summing/multiplying from 0 to 10 not 1 to 10.

You want 10.001 {PI} B.


- Pauli

#3

Compare p. 112 of the manual.

d:-)

#4

My bad. RTFM!

Thanks,
Eduardo

Quote:
You want 10.001 {PI} B.

- Pauli




Possibly Related Threads…
Thread Author Replies Views Last Post
  [OT] Mathematica free for Raspberry PI BruceH 32 8,059 11-23-2013, 05:24 AM
Last Post: Nick_S
  Computing pi with the PC-1300S Kiyoshi Akima 0 1,086 11-17-2013, 12:24 AM
Last Post: Kiyoshi Akima
  Prime: Exam mode (possible duplicate after funny response first time) Paul Townsend (UK) 1 1,440 10-24-2013, 03:09 PM
Last Post: Tim Wessman
  Calculating Pi LHH 9 2,740 09-27-2013, 10:50 PM
Last Post: Gerson W. Barbosa
  wp34s binomial bug Andrew Nikitin 4 1,762 09-22-2013, 05:20 PM
Last Post: Paul Dale
  Visualization of pi Bruce Bergman 13 3,590 08-17-2013, 05:00 PM
Last Post: Howard Owen
  Expon bug in wp34s Andrew Nikitin 7 2,179 07-14-2013, 03:23 AM
Last Post: Marcus von Cube, Germany
  another wp34s bug Andrew Nikitin 8 2,433 06-26-2013, 01:01 AM
Last Post: Paul Dale
  weird statistics bug in wp34s Andrew Nikitin 5 2,071 06-20-2013, 01:54 PM
Last Post: Namir
  OT: Happy Pi Day! Eddie W. Shore 13 3,571 03-22-2013, 10:44 AM
Last Post: Les Koller

Forum Jump: