Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Giacomo Pigani

Pages: [1]
1
General Calculator Help / TI-89 scrollable formula
« on: July 12, 2017, 06:00:08 pm »
Hi, I switched to a TI-89 from a ti 84 recently, and I think this calculator is very powerful.
However, on the ti 84 I used a program named PrettyPrint which allowed me to display formulas from a basic program.

This program had a really nice feature: basically, if the formula was very large and couldn't fit the screen, I could use the right and left arrows to move back and forth.

Now, on the ti 89 I found plenty of programs to display formulas, however all of them use the system call to prettyprint a string, so if a formula is bigger than the screen, it gets chopped.

Now, does any of you know of a program that can help me out?

Thanks!



This one looks promising, judging from the preview: http://www.ticalc.org/archives/files/fileinfo/398/39896.html

Edit (Eeems): Merged double post

2
TI-BASIC / Re: Help overcoming Symbolic bug
« on: November 13, 2016, 05:41:31 pm »
No, don't worry... this is a Symbolic "feature" :-)

3
TI-BASIC / Re: Help overcoming Symbolic bug
« on: November 11, 2016, 11:20:50 am »
So, I came up with a simple and really nice solution, although it can only apply to this specific problem with symbolic.
As a plus, it doesn't need other libraries apart from symbolic

Code: [Select]
If 1=1:Then
    "X*X^2"→Str1
    "2*3"→Str2
   
    ClrHome
    Disp real(13,Str1+"+0")
    Disp real(13,Str2+"+0")
End

//Output:
// X^3 : Ok
// 6   : Ok

I also tested it with the Symbolic's derive and it works too

4
TI-BASIC / Re: Help overcoming Symbolic bug
« on: November 10, 2016, 04:18:58 pm »
The suggestion didn't  work sadly. I don't really know where that bug could originate from.
Also, I had to elaborate a cumbersome way to support the case where the string contained two-byte tokens, since length counts a two byte token as just one. Also, I found out that this type of errors happens also when using variables like A-Z, if inside an if

5
TI-BASIC / Re: Help overcoming Symbolic bug
« on: November 07, 2016, 07:14:09 am »
Ok, so after about 5 hours of struggling, I was able to find a solution (thanks to Xeda112358, as always :P)

Code: [Select]
If 1=1:Then
    "X*X^2"→Str1
    "2*3"→Str2
   
    ClrHome
    Disp real(13,dim(11,0,"DStr1",length(Str1)))
    Disp real(13,dim(11,0,"DStr2",length(Str2)))
End

//Output:
// X^3 : Ok
// 6   : Ok

6
TI-BASIC / Help overcoming Symbolic bug
« on: November 07, 2016, 06:59:00 am »
I found a very annoying little bug with Symbolic

Code: [Select]
If 1=1:Then
    "X*X^2"→Str1
    "2*3"→Str2
   
    ClrHome
    Disp real(13,Str1)
    Disp real(13,Str2)
End

//Output:
// X^3 : Ok
// X^3 : Not Ok

Basically, if I want to use the simplify function more than once inside an If statement and the functions I want to simplify are in a string, simplify will refuse to give the correct result. In this case for example, it returns the previous result.

However, if the actual string to simplify is given things seems to work out:

Code: [Select]
If 1=1:Then   
    ClrHome
    Disp real(13,"X*X^2")
    Disp real(13,"2*3")
End

//Output:
// X^3 : Ok
// 6   : Ok

7
TI-BASIC / Re: Convert decimal to fraction as a string (TI-84)
« on: October 25, 2016, 06:42:10 pm »
Thanks for the idea but that's just not possible, however I just remembered that omnicalc features a simplify function.
I already tested on simple values, where it would just return the input, however i believe that if i give it in input the function that calculates the decimal fraction it should simplify it in a regular fraction

By the way, thank you for making batlib, it was a great resource for my project!

8
TI-BASIC / Re: Convert decimal to fraction as a string (TI-84)
« on: October 24, 2016, 07:12:53 pm »
Thanks again, it was just for some statistics programs I've been making.
Basically I output some steps using PrettyPrint, which requires a string, so I convert everything to string.
Since I spent a lot of time making it, I wanted it to be perfect, so I decided I would turn decimal fractions like 0,4375 into something more readable like 7/16.

Now I've done that, thanks to you. Who cares if the code is messier ;-)

9
TI-BASIC / Re: Convert decimal to fraction as a string (TI-84)
« on: October 24, 2016, 02:41:47 am »
Thanks a lot! Both yours solutions seems to be working well, however apart from the conversion, is there a simple way to create a method which returns the string?

Right now I'm using Xeda112358's answer like this:

Code: [Select]
A:prgmFRAC:Ans->Str2
B:prgmFRAC:Ans->Str3
C:prgmFRAC:Ans->Str4

"X^("+Str2+"*2)*"+Str3+"="+Str4-->Str1

However the code has become messy, is there a way to do something like this?

Code: [Select]
"X^("+frac(A)+"*2)*"+frac(B)+"="+frac(C)-->Str1
Maybe creating some sort of hook

10
TI-BASIC / Convert decimal to fraction as a string (TI-84)
« on: October 22, 2016, 05:47:18 pm »
Hi, I've wrote some programs in basic which make use of PrettyPrint (and symbolic to use pretty from my basic program)
Now, PrettyPrint takes it's input as a string, and for that I already use BatLib to convert numbers to strings, however I would like that if I have, let's say 0.375, to just be 1/8, which PrettyPrint displays in a nice form.

The TI-84 has a nice little function >Frac which converts an integer into a fraction and displays it in a nice way, hower I can't get the value as a string, nor get the nominator and denominator.

Looking around I found Zfrac, which deals with issue
Code: [Select]
call _ZeroOP1
ld hl,OP1+1
ld (hl),'W'
call _RclVarSym
call _ToFrac
call _PushRealO1
call _ZeroOP1
ld hl,'W'
ld (OP1+1),hl
call _StoOther
call _OP1ExOP2
call _PushRealO1
call _ZeroOP1
ld hl,'I'
ld (OP1+1),hl
call _StoOther
ret

What the code seems to be doing is taking advantage of the _ToFrac system call and then getting the output. This should then save the nominator and the denomitor to W and I, however I haven't been able to compile it or to get the compiled version to work (Yes, I used: Asm(prgmZCALC)


What I'd like, if somebody knows how is to have something like this:
"X^("+frac2str(0.375)+"*2)"-->Str1


Thank you!

11
The Axe Parser Project / Re: Read lowercase letters from Ti-Basic string
« on: February 13, 2016, 07:28:17 pm »
Thank for pointing me in the right direction. I came up with a Lbl. It' isn't over yet, but it includes almost all the characters used

Code: [Select]
Lbl ASCII
    A→D
    If A=4:28→D:End
    If A=6:193→D:End
    If A=7:93→D:End
    If A=8:123→D:End
    If A=9:125→D:End
    If A=11:20→D:End
    If A=16:40→D:End
    If A=17:41→D:End
    If A=41:32→D:End
    If A=42:34→D:End
    If A=43:44→D:End
    If A=44:215→D:End
    If A=45:33→D:End
    If A=58:46→D:End
    If A=62:58→D:End
    If A=106:61→D:End
    If A=107:60→D:End
    If A=108:62→D:End
    If A=109:23→D:End
    If A=110:25→D:End
    If A=111:24→D:End
    If A=112:43→D:End
    If A=113:45→D:End
    If A=130:42→D:End
    If A=131:47→D:End
    If A=174:39→D:End
    If A=175:63→D:End
    If A=176:26→D:End
    If A=240:94→D:End
   
    If A=187
        C++
        1→Z
       
        If {S+C}≥159 ? {S+C}≤164
            {S+C}+28→D
        End
       
        If {S+C}=165:194→D:End
        // Where is Mu? (166)
        If {S+C}=167:195→D:End
        If {S+C}=168:196→D:End
        If {S+C}=169:197→D:End
        If {S+C}=171:201→D:End
        If {S+C}=172:202→D:End
       
        If {S+C}≥176 ? {S+C}≤186
            {S+C}-79→D
        End
       
        If {S+C}≥188 ? {S+C}≤202
            {S+C}-80→D
        End
       
        If {S+C}=203:199→D:End
        If {S+C}=204:200→D:End
        If {S+C}=207:126→D:End
        If {S+C}=209:64→D:End
        If {S+C}=210:35→D:End
        If {S+C}=211:242→D:End
        If {S+C}=212:38→D:End
        If {S+C}=213:96→D:End
        If {S+C}=214:59→D:End
        If {S+C}=215:92→D:End
        If {S+C}=216:124→D:End
        If {S+C}=217:95→D:End
        If {S+C}=218:37→D:End
        If {S+C}=219:206→D:End
        If {S+C}=241:8→D:End
    End
   
   
    //Special unused codes, used by me
    If A=38:6→D:End
   
   
    D→A
Return

12
The Axe Parser Project / Read lowercase letters from Ti-Basic string
« on: December 03, 2015, 04:47:49 am »
Let's say that in a normal Ti-Basic program i create a string like this:

Code: [Select]
"Lorem ipsum dolor"->Str1
And then I have and Axe program I made to display text.

To display I do something like this (oversimplified example)
I like it this way so I can do some checks on A, reduce pixels from one letter to another and so on...

Code: [Select]
{S+C}→A
while A≠0
Text(J,I,°A)
{S+C}→A
End

If I take the variable like this, only uppercase letter work (I think it has something to with 1 byte and 2 bytes tokens)
Code: [Select]
"Str1"→Str1
GetCalc(Str1)→S

However, directly assigning a string in Axe works (I read somewhere that all letters use 1 byte in axe)
Code: [Select]
"Lorem ipsum dolor"->S

I found this question which seems linked to my problem, but I'm not entirely sure and it also got no answers.
Here Runer112, says "TI Program Editor parses these as these special tokens and not lowercase letters. Due to this, they turn into garbage when parsed inside strings by Axe".
https://www.omnimaga.org/the-axe-parser-project/features-wishlist/msg132719/?topicseen#msg132719



Maybe I'll take a look at TokenIde to see if something can be done. Otherwise I though the Copy function could have been of help. Do you know any solutions?

Pages: [1]