You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library includes an ERational class for arbitrary-precision rational numbers, but doesn't include a way to create an ERational from a string like the other classes EInteger, EDecimal, and EFloat. This is because I'm not sure what format to accept for strings representing rational numbers. Here is a possible idea:
["("] [-] Number "/" [-] Number [")"]
Note that parentheses appear here because Ruby, at least, writes rational number strings this way. How do other languages and popular libraries parse rational number strings? Would it be good to use a string format that combines all of those formats?
The text was updated successfully, but these errors were encountered:
This library includes an ERational class for arbitrary-precision rational numbers, but [as of Jan. 18, 2016] doesn't include a way to create an ERational from a string like the other classes EInteger, EDecimal, and EFloat. This is because I'm not sure what format to accept for strings representing rational numbers. Here is a possible idea:
["("] [-] Number "/" [-] Number [")"]
Note that parentheses appear here because Ruby, at least, writes rational number strings this way. How do other languages and popular libraries parse rational number strings? Would it be good to use a string format that combines all of those formats?
This would be good but also spaces should be allowed between these 7 components. The built-in types allow spaces before and after the number, whereas the current ERational.FromString does not. This should be changed.
This library includes an ERational class for arbitrary-precision rational numbers, but doesn't include a way to create an ERational from a string like the other classes EInteger, EDecimal, and EFloat. This is because I'm not sure what format to accept for strings representing rational numbers. Here is a possible idea:
Note that parentheses appear here because Ruby, at least, writes rational number strings this way. How do other languages and popular libraries parse rational number strings? Would it be good to use a string format that combines all of those formats?
The text was updated successfully, but these errors were encountered: