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



Post: #2

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


Post: #3

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?


Post: #4

[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.


Post: #5

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

Post: #6

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


Forum Jump: