Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Adding float numbers #34

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

Adding float numbers #34

PeterTillema opened this issue Dec 2, 2017 · 3 comments
Labels

Comments

@PeterTillema
Copy link
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
Copy link
Owner Author

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
Copy link
Owner Author

PeterTillema commented Mar 13, 2018

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

@PeterTillema
Copy link
Owner Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant