HP PRIME: How to use [a b/c] key from a program « Next Oldest | Next Newest »

 ▼ Joseph Ec Junior Member Posts: 34 Threads: 10 Joined: Oct 2013 10-29-2013, 05:08 PM 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 ▼ Han Senior Member Posts: 709 Threads: 104 Joined: Nov 2005 10-29-2013, 05:12 PM 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? ▼ CompSystems Member Posts: 213 Threads: 60 Joined: Mar 2013 10-29-2013, 05:25 PM [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. ▼ Joseph Ec Junior Member Posts: 34 Threads: 10 Joined: Oct 2013 10-29-2013, 06:06 PM 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 Joseph Ec Junior Member Posts: 34 Threads: 10 Joined: Oct 2013 10-29-2013, 06:18 PM 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 5,067 12-10-2013, 05:35 PM Last Post: Erwin Ried Problem with debug HP prime program, somebody help me? Carlos CM (Mexico) 6 2,306 12-05-2013, 03:07 PM Last Post: Carlos CM (Mexico) HP PRIME: APP program code DISAPPEARS !! Joseph Ec 0 703 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 1,524 11-19-2013, 08:59 AM Last Post: Miguel Toro Prime: Program size limited to 64K? Erwin Ried 4 1,387 11-17-2013, 11:42 PM Last Post: Joseph Ec More Prime problems - lost Apps key again Michael de Estrada 10 2,047 11-16-2013, 12:46 PM Last Post: Michael de Estrada [HP-Prime] Picking elements from a List in a program Jean-Michel 3 1,333 11-15-2013, 04:16 AM Last Post: dg1969 HP Prime: Recommendation for future RPN Program Mode BruceTTT 3 1,351 11-13-2013, 10:03 PM Last Post: BruceTTT HP Prime: run a program in another program Davi Ribeiro de Oliveira 6 1,843 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,226 11-09-2013, 09:41 PM Last Post: Joseph Ec

Forum Jump: