Skip to content
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

Add floating point support #314

Merged
merged 16 commits into from
Aug 6, 2024
Merged

Conversation

casuallyblue
Copy link
Contributor

This is the initial steps of floating point support for mirth. I'm uploading it before it is completely done for feedback before I implement any further. This includes a partial implementation of a mandelbrot set renderer example.

@typeswitch-dev
Copy link
Contributor

Great work! The only note I have is that I'd like the name of the float type in mirth be:

  • Float64 for double-precision floats, and
  • Float32 for single-precision floats.

Once that is renamed, I think it would be ok to merge this PR, even without single-precision!

@casuallyblue
Copy link
Contributor Author

Great work! The only note I have is that I'd like the name of the float type in mirth be:

* `Float64` for double-precision floats, and

* `Float32` for single-precision floats.

Once that is renamed, I think it would be ok to merge this PR, even without single-precision!

Everything's renamed, and I made the internal value be a float instead of storing as a string. Still figuring out why the windows build suddenly can't find snprintf even though it could before.

Copy link
Contributor

@typeswitch-dev typeswitch-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can just use sprintf here (temporarily)

src/mirth.h Outdated Show resolved Hide resolved
src/mirth.h Outdated Show resolved Hide resolved
casuallyblue and others added 6 commits August 5, 2024 15:54
Co-authored-by: typeswitch-dev <typeswitch@protonmail.com>
Co-authored-by: typeswitch-dev <typeswitch@protonmail.com>
@typeswitch-dev typeswitch-dev merged commit 68ac606 into mirth-lang:main Aug 6, 2024
9 checks passed
@typeswitch-dev
Copy link
Contributor

Thanks @casuallyblue!

@casuallyblue casuallyblue mentioned this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants