HP PRIME: How to use [a b/c] key from a program



#4

Hi Friends,


I need to use integers or fractions (not reals) so i need to convert 0.3333.. to get 1/3 I can do with [a b/c] key but how to use that from inside a programs ?

Thans and best regards!!

jose


#5

Quote:
Hi Friends,

I need to use integers or fractions (not reals) so i need to convert 0.3333.. to get 1/3 I can do with [a b/c] key but how to use that from inside a programs ?

Thans and best regards!!

jose


Perhaps the EXACT() function is what you're looking for?


#6

[a <-> b/c ] dual function key => exact( ), approx()

example:

poly1[1,(-3*a-3*b-7)/3,(7*a+7*b+2)/3,(-2*a-2*b)/3];

[a <-> b/c ] =>

approx(poly1[1,(-3*a-3*b-7)/3,(7*a+7*b+2)/3,(-2*a-2*b)/3]); =>

poly1[1.,(-3.*a-3.*b-7.)*0.333333333333,(7.*a+7.*b+2.)*0.333333333333,(-2.*a-2.*b)*0.333333333333]

[a <-> b/c] =>

exact( Ans );

poly1[1,(-3*a-3*b-7)*1/3,(7*a+7*b+2)*1/3,(-2*a-2*b)*1/3]

Edited: 29 Oct 2013, 5:29 p.m.


#7

Friend,

Thank so much,

exact() command is the function tha I need,

But, [a b/c] works direct in all MATRIX elements and exact() doesn´t work with matrix ... I wil try to do element by element...

Best regards!!
joseph

#8

Friend,

That was the trick BUT,

ONCE running in the emulator program i GET "The application has crashed and will be restarted"....

Would be nice if the calculator indicates the command that cause the failure and mainly the REASON (allowed types or hint ).

Some idea ?

Best regards!!
joseph


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sending little images to the Prime (...and Program name bug?) Erwin Ried 19 7,556 12-10-2013, 05:35 PM
Last Post: Erwin Ried
  Problem with debug HP prime program, somebody help me? Carlos CM (Mexico) 6 3,440 12-05-2013, 03:07 PM
Last Post: Carlos CM (Mexico)
  HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 1,250 11-25-2013, 11:35 AM
Last Post: Joseph Ec
  Prime: Placing more than 1 item on the RPN stack in a single program? John Colvin 4 2,334 11-19-2013, 08:59 AM
Last Post: Miguel Toro
  Prime: Program size limited to 64K? Erwin Ried 4 2,105 11-17-2013, 11:42 PM
Last Post: Joseph Ec
  More Prime problems - lost Apps key again Michael de Estrada 10 3,180 11-16-2013, 12:46 PM
Last Post: Michael de Estrada
  [HP-Prime] Picking elements from a List in a program Jean-Michel 3 2,086 11-15-2013, 04:16 AM
Last Post: dg1969
  HP Prime: Recommendation for future RPN Program Mode BruceTTT 3 2,230 11-13-2013, 10:03 PM
Last Post: BruceTTT
  HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 2,785 11-11-2013, 08:28 PM
Last Post: Davi Ribeiro de Oliveira
  [prime] Insert a breakpoint in a program for debugging ? Olivier Lecluse 3 1,838 11-09-2013, 09:41 PM
Last Post: Joseph Ec

Forum Jump: