New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding float numbers #34

Open
PeterTillema opened this Issue Dec 2, 2017 · 3 comments

Comments

Projects
1 participant
@PeterTillema
Owner

PeterTillema commented Dec 2, 2017

This is definitely a thing I want to implement, but I'm not sure how. Would all numbers/variables be treated as float numbers? That would be much slower than just 3-byte integers. On the other side, I can't detect if a variable is a float or an integer, for example this: 2->A:If B:2.5->A.

@PeterTillema

This comment has been minimized.

Show comment
Hide comment
@PeterTillema

PeterTillema Dec 4, 2017

Owner

Idea: prescan the program multiple times, and if it sees a float being stored to a variable, mark that variable as a float. If that variable is used in another expression to store to another variable, mark that variable as a float too, etc, until no more floats are found. This means that 2->A:A/2->B results in B being an integer, but 2.0->A:A/2->B in a float.

Owner

PeterTillema commented Dec 4, 2017

Idea: prescan the program multiple times, and if it sees a float being stored to a variable, mark that variable as a float. If that variable is used in another expression to store to another variable, mark that variable as a float too, etc, until no more floats are found. This means that 2->A:A/2->B results in B being an integer, but 2.0->A:A/2->B in a float.

@PeterTillema PeterTillema added v3.0 and removed v2.1 labels Dec 9, 2017

@PeterTillema

This comment has been minimized.

Show comment
Hide comment
@PeterTillema

PeterTillema Mar 13, 2018

Owner

Main target for v3.0, see branch better-ice

Owner

PeterTillema commented Mar 13, 2018

Main target for v3.0, see branch better-ice

@PeterTillema PeterTillema added this to To Do in ICE v3.0 via automation Mar 14, 2018

@PeterTillema PeterTillema removed the question label Mar 14, 2018

@PeterTillema

This comment has been minimized.

Show comment
Hide comment
@PeterTillema

PeterTillema Jul 14, 2018

Owner

Related TI-BASIC functions: int(, iPart(, fPart(, round(, besides float functions, like sin(, cos(, log( etc.

Owner

PeterTillema commented Jul 14, 2018

Related TI-BASIC functions: int(, iPart(, fPart(, round(, besides float functions, like sin(, cos(, log( etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment