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

feat: handle plus sign in scientific notation floats #223

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cvigilv
Copy link

@cvigilv cvigilv commented Jan 16, 2025

This PR adds the ability to have floating number in scientific notation as follows:

1e+10
1E+10

Before, it would raise an error of the type:

problem with number read 1e, not a float number
problem with number read 1E, not a float number

Example:

julia> net = readnewick("((a:1,(b:1)):5,(c:1):1e+10);")
HybridNetwork, Rooted Network
6 edges
7 nodes: 3 tips, 0 hybrid nodes, 4 internal tree nodes.
tip labels: a, b, c
((a:1.0,(b:1.0)):5.0,(c:1.0):1.0e10);

To Do:

  • Cover with unit tests

@cvigilv
Copy link
Author

cvigilv commented Jan 16, 2025

This is a draft PR since I'm unsure where to put the test. Please let me know and I'll do that.

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.

1 participant