problem devolping a formula
- To: mathgroup at smc.vnet.net
- Subject: [mg2954] problem devolping a formula
- From: ryangall at gpu.srv.ualberta.ca (Bobby Sixkiller)
- Date: Mon, 15 Jan 1996 03:40:15 -0500
- Organization: University of Alberta, Edmonton, Canada
I am wondering if there is any way I can find a formula that will solve the following condidion CONSTANTS: MAX=1000 MIN=0 PRECONDITIONS Z=SOME NUMBER (arbitrary) N=0; IF N=0 THEN maxx=MAX; maxy=MAX; minx=MIN; miny=MIN; POST CONDITION: SPACE is returned as the answer FORMULA: FOR N=0 TO N=Z DO N+1 /* RUN THE LOOP Z TIMES */ { SPACE=(maxx-minx)/(2*MAXAXIS); maxy=maxx-1; maxy=maxy-1; minx=minx+1; miny=miny+1; } -------------------------- I hope you understand what I want, I originally wrote this in C, but tried to write it more universally for this post. what I want (if possible) is some formula that wont have to go through this for loop/series sum ,to get the desired number.Since the Z value can easily be over 10000 the time it take is unacceptable (Im using it for graphics). I need some function that takes in a z value, and pops out SPACE as the answer, If any of you know how to do this, or perhaps doing it some other way, please e-mail me asap....one more thing, can you explain how you got the answer, I deal with these sorts of problems all the time, but have no mathematical insight to them.....If you don have time to explain it, could you tell me what I can study to learn about it. THANKS ALOT FOR YOUR HELP! ==== [MESSAGE SEPARATOR] ====