Jump to content



Photo
- - - - -

Help In Programation(traducido Por Un Traductor)


  • Please log in to reply
2 replies to this topic

#1 Nexo4ever

Nexo4ever

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 January 2005 - 09:48 PM

Hello to all, I do not speak very well groins and given q do not I find ningun forum in Spaniard (spanish) him pondre aqui to see if someone understands me.


my problem is q al to plan kiero q of an expreison as x/2 to the q I give a value from 3 to the x (x=3) can store it in a variable (a) in the following way:
1.5
Itself it is not stored me as a numero decimal if not q is kept like 3/2.
In the administrator of variables I select the variable to and 3/2 appears me.

I do not find ningun command for q be stored me as decimal and not like expresion.

the problem comes q when they are expresion very large and q ademas they are repeated verias times (are inside a loop), me kedo without memory!!! and I do not obtain the result, (example program of newton to obtain a value)

I need helps urgent q arrive the exams and themselves not as to solve it

Thanks

#2 SoftCalc

SoftCalc

    Casio Technician

  • Members
  • PipPipPipPipPipPip
  • 406 posts
  • Location:Portland, OR USA

  • Calculators:
    ClassPad 300 , AFX 2.0, HP-48/49/50, TI-89/92/Voyager, HP Expander, etc...

Posted 07 January 2005 - 10:35 PM

I am not sure if I understand your problem completely, :huh: but I will try to answer it.

It sounds like you are having a problem with expressions getting too big when used recursively in a loop.

You can force 3/2 to be 1.5 using the "approx" function. This can speed up a loop. For example, the program below will get very slow because "a" will become a big expression.

NOTE: EXAMPLE ONLY. THIS WILL NOT COMPILE:
   2 -> a
   for i=1 to 100
     (a+1)^(1/2) -> a
   next

You can solve this problem using the "approx" function...

NOTE: EXAMPLE ONLY. THIS WILL NOT COMPILE:
   2 -> a
   for i=1 to 100
     approx((a+1)^(1/2)) -> a
   next

Does this solve your problem?

#3 Nexo4ever

Nexo4ever

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 07 January 2005 - 11:40 PM

You have solved my problem,thank you very much :roflol:




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users