Repository navigation
Support parsing - #327
Support parsing#327PatrickHaecker wants to merge 1 commit into
Conversation
|
The development branch has been moved to v0.9. I don’t think adding a parser is a bad idea, but we need to discuss which formats to accept. If there are ambiguities or limitations in the specification, or if it is essentially a reimplementation of |
Add `tryparse` (and thereby `parse`) for `Fixed` and `Normed` types. The decimal string is rounded exactly to the nearest representable value, with ties to even, so the result never suffers from double rounding through an intermediate float. It works on fixed-width integers for raw types up to 64 bits, which makes it about twice as fast as converting from `Float64`, allocation-free, and compatible with `--trim`.
4bdd894 to
e39bb28
Compare
|
There was a reason why this is useful, but I don't fully remember it. The current state is ported to 0.9 by the agent, but I wasn't really happy with the status and have changed some things, but have not reviewed everything. Currently it does not seem worth the time. I'd invite everyone (including future-me) to reopen this when it's clear what the benefit is. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #327 +/- ##
==========================================
+ Coverage 96.85% 97.38% +0.52%
==========================================
Files 7 7
Lines 796 879 +83
==========================================
+ Hits 771 856 +85
+ Misses 25 23 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Support
Base.parseandBase.tryparseforNormedandFixed.