Omnimaga

Calculator Community => TI Calculators => TI-BASIC => Topic started by: Rhombicuboctahedron on January 17, 2013, 10:55:21 pm

Title: pretty up disp output
Post by: Rhombicuboctahedron on January 17, 2013, 10:55:21 pm
I’m sure I know of everything on the nspire and programming it, but is there a way to display a function and variable in a pretty manner?
I’m revisiting a program I made and it displays “1/6*pi^2”
Is there a way to display the symbol pi to an exponent and multiplied by a fraction without it being ugly or calculating a numeric value?
Title: Re: pretty up disp output
Post by: leafy on January 17, 2013, 11:12:54 pm
You could always try repeatedly dividing by pi, keeping track of how many times you've done it, and when you finally get a rational value, use the graphscreen trick to make that value into a string. From there, it's as simple as concatenating a "pi^" and the number to the end of the string.

EDIT: From my experience, making the output prettier is almost never worth it in BASIC. You're better off just displaying the value and making the users figure out how many pis are in it, the lazy sots.
Title: Re: pretty up disp output
Post by: Rhombicuboctahedron on January 17, 2013, 11:24:55 pm
Oh, no
I know how pi's are in it
It literally outputs in quotations 1/6 multiplication dot pi symbol caret symbol 2
It's okay, but not very pretty, and after a while it would be nice to have it be 1 over 6 instead of 1/6
Title: Re: pretty up disp output
Post by: aeTIos on January 18, 2013, 09:27:24 am
That could be possible, but I'd say it's not worth the effort.