# Casio FX-700P programming

I decided to make something usefull for my FX-700P. So I wrote a program that gives internal forces from a beam and computes necessary cross-section (for steel beams and the IPE-type cross sections only). The program uses several simplifications, it takes into account only a bending moments so it is for a preliminary design only. I actually needed it for some work in the wild when no real computer with me and when a fast (and thus just a preliminary) decision is needed.

So the program takes internal forces (bending moment, shear force and normal force) and uses basic computations (normal stress from M/W+N/A and a shear stress computation) to decide what IPE size is enough.
The IPE cross section parameters are approximated by continuous functions to save the memory of the calculator.

The code for the FX-700P looks like this:

```10  INPUT "M=",M
20  INPUT "V=",V
30  INPUT "N=",N
40  D = 235000000 * 0.9
100 J = 0 TO 12 STEP 1
110 H = 80 + J*20
120 A = H*H*0.000338738+H*0.0836899 -1.60321
130 I = H*H*H*0.000475247 -0.0512346*H*H + 212.463
140 B = 0.0148498*H + 2.62096
150 F = 0.0249428*H + 3.39449
160 E = 0.465021*H + 8.23748
170 S = (F*B*H/2)/1000000+((H/2.0-B/2.0)*F)/1000000
180 H = H/1000
190 A = A/10000
200 I = I/100000000
210 W = I/(0.5*h)
300 IF ABS(N/A - M/W) > D THEN 400
310 IF ABS(N/A + M/W) > D THEN 400
320 IF ABS(V*S / I*B) > D THEN 400
330 GOTO 410
400 NEXT J
410 PRINT "IPE";H*1000
```

For a comparison there is a C code that does exactly the same:

```int assess_IPE(double M, double V, double N)
{
int i ;
double h, A, I, W, S, Sh,f,e,a, fy;
double sigma_top, sigma_bot, tau_top, tau_max ;

fy = 235e6 * 0.9 ; /* design value of yield stress */

for (i=0; i 240)&&(h = 300) h = 330 ; /* fix fo real h sizes */

/* approximations: */
A = h*h*0.000338738  + h*0.0836899 -1.60321 ;
I = h*h*h*0.000475247 -0.0512346*h*h + 212.463 ;
a = 0.0148498*h + 2.62096;  /* wall thickness */
f = 0.0249428*h + 3.39449 ; /* thicknes of top part  */
e = 0.465021*h + 8.23748  ; /* width of the top part */

S = ((h/2.0-a/2.0)*f)/1e6 ; /* static moment S: UNUSED ATM */
Sh = S + (pow(h/2-a,2)/2.0*a)/1e6 ; /* static moment for center (h/2) */

h = h/1e3 ; /* mm  -> m  */
A = A/1e4 ; /* cm2 -> m2 */
I = I/1e8 ; /* cm4 -> m4 */
W = I/(0.5*h) ;

/* Stresses: */
sigma_top = N/A - M/W ;
sigma_bot = N/A + M/W ;
tau_max   = V*Sh / I*a ;

if ((fabs(sigma_top)<fy)&&(fabs(sigma_bot)<fy)&&(fabs(tau_max)<fy/sqrt(3)))
{
fprintf(stdout,"Found IPE%i\n",(int)(h*1000));
break;
}
}
return(0);
}
```

Both codes are under the GPL v2. But once more: please do not use these codes for any real work! I don’t tested their correctness too much and they use some big simplifications.

Just for those who are curious about it: the BASIC code also works on the Elektronika MK-85.