# HP Forums

Full Version: [WP 34s] Another noobie question about programming
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Dear all, thank you for your patience in advance.

Please, let me ask you a couple more question about the 34s:

I would like to integrate a function like $$f(x) = \frac{1}{x+a}$$ where $$a$$ is as large as 1000. Not knowing exactly how things worked in previous HP calcs, I naively typed 1500 for $$a$$ directly into the program, well, you know what happened.
The manual says that integers (say $$n$$) can be keyed in using the # symbol, however, it also states that $$0\leqslant n \leqslant 255$$. Now comes the noobie question:

Do I have to modify $$n$$ by assigning, for example, 250 to it and multiply by 6 to get 1500? Or I am missing something here?

Thank you

Marcio

EDIT: Alternatively, I could also assign a register to $$a$$ before using it in the program, in case $$a$$ is a prime number and greater than 255.
I see various ways to accomplish this:

1. You can just type the number into your program:

LBL 00
1
5
0
0
+
1/x
RTN

2. If your number is a multiple of 10 use:

LBL 00
# 150
SDL 1
+
1/x
RTN

3. The most flexible approach uses register 00 to hold a:

LBL 00
RCL+ 00
1/x
RTN
Yeap, storing $$a$$ and calling it from the program is the way to go.

Thanks.
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :