Misomosi
a9f2271a90
Fix magnitude check in parse_f64_prefix
2024-10-22 21:27:39 -04:00
Jeroen van Rijn
300b01d77d
Return "" for rune < 0 in strconv.
2024-09-08 00:32:46 +02:00
Feoramund
8cd7fd95a3
Don't factor trailing zeroes into mantissa division
...
This should fix issues where `N00 / (pow+2)` results in a different number
than `N / pow`.
2024-06-30 22:18:25 -04:00
gingerBill
3a9b86628a
Add @(rodata) and @(static, rodata) where appropriate
2024-06-06 15:23:52 +01:00
gingerBill
a747e47582
Merge pull request #3675 from Feoramund/fix-partial-infinity
...
Fix partial parsing of `infinity`
2024-06-05 12:48:44 +01:00
Feoramund
25feff3eb4
Permit parsing of incomplete infinity but do not return true
...
To clarify, `parse_f64` will indeed take `infi` to mean `+Inf` and
return that as the value, but it will not return `ok = true`. It treats
it as `inf` followed by any other trailing character.
`parse_f64_prefix` is the lenient one which will return true so long as
it finds some meaningful value.
2024-06-04 18:55:13 -04:00
Jeroen van Rijn
f0a6fb4057
Merge pull request #3678 from Feoramund/fix-p-f64-p-doc
...
Strike incorrect note from `parse_f64_prefix` doc
2024-06-05 00:02:34 +02:00
Feoramund
b4cfae222c
Strike incorrect note from parse_f64_prefix doc
2024-06-04 17:50:19 -04:00
Feoramund
265e6aa781
Add parse_complex/quaternion* to core:strconv
2024-06-04 17:12:55 -04:00
Feoramund
d33668fa91
Fix partial parsing of "infinity" in parse_f64_prefix
...
It was previously reporting an invalid number of characters parsed for
any string other than "inf", "+inf", or "-inf".
2024-06-04 13:24:46 -04:00
Jeroen van Rijn
3a3ae6d0df
Fix and re-enable .doc tests.
2024-05-11 19:25:35 +02:00
Feoramund
8c111f1baf
Fix %e printing incorrect precision
...
For example, `%.2e` with 30.56 as the value would produce `30.60e+01`,
as opposed to C's printf producing `30.6e+01`.
2024-05-09 19:37:17 -04:00
gingerBill
3ad95d6be3
Add append_u128
2024-04-10 14:35:00 +01:00
Laytan Laats
3a0df80066
correct newly found vets
2024-04-03 00:52:58 +02:00
gingerBill
3e7e779abf
Replace core:* to base:* where appropriate
2024-01-28 22:18:51 +00:00
Jeroen van Rijn
e52cc73d50
Fix generic_float.odin
2023-12-21 22:37:26 +01:00
gingerBill
55f3e99f63
Fix %g in fmt, and make %v default to %g for floats
2023-12-21 17:05:24 +00:00
Jon Lipstate
7a8aa03e54
doc tests verified
2023-04-06 14:58:57 -07:00
Jon Lipstate
846c0f7cfc
add decimal subpackage ref
2023-04-06 09:56:27 -07:00
Jon Lipstate
1886193c6c
resolve doc-test issues
2023-04-06 09:44:57 -07:00
Jon Lipstate
ed7284add2
parens
2023-04-06 00:14:46 -07:00
Jon Lipstate
9ecbd70daa
parens
2023-04-06 00:02:57 -07:00
Jon Lipstate
b8989d9bf9
strconv docs
2023-04-05 23:52:11 -07:00
Jon Lipstate
0570c84a83
initial
2023-03-28 15:40:48 -07:00
Jon Lipstate
a3860e23c6
doc decimal
2023-03-28 13:09:21 -07:00
gingerBill
09a0dad115
Add contextless to internal parse_hex call
2023-03-16 12:43:10 +00:00
gingerBill
ef999f660b
Remove debug code
2023-03-06 19:46:50 +00:00
gingerBill
fad330acd1
Fix bug with nil pointer
2023-03-06 15:21:20 +00:00
gingerBill
8f1af2630d
Fix typo in parse_components
2023-03-06 13:40:06 +00:00
gingerBill
ff275df5ea
Fix parsing C-like hex floats
2023-03-06 12:39:52 +00:00
Hyp-X
a3bb7d3028
Fix decimal_to_float_bits for floats >= 1
2023-01-28 14:40:44 +01:00
gingerBill
97595c4b50
Use a LUT for shift_left
2023-01-23 14:00:02 +00:00
gingerBill
ea9fe397e5
Fix typo in decimal_to_float_bits
2023-01-23 12:46:03 +00:00
MarenFayre
68173f4bc7
Remove unused formatting flag
2023-01-08 20:24:08 +01:00
MarenFayre
c979c2fafa
Fix left padding format specifier and float formatting
2023-01-08 20:00:42 +01:00
gingerBill
b9ec2de4db
strconv.parse_f64 - accurately parse floats
2022-11-21 13:00:24 +00:00
Jeroen van Rijn
4c78ba2152
Fix #2122
2022-10-09 21:34:43 +02:00
Jeroen van Rijn
cd910b1512
[strconv] Add parsing of Inf & NaN
2022-09-28 16:41:26 +02:00
gingerBill
026900c7f0
Add optional n parameter to strconv.parse_* procedures to state how many bytes could be read
2022-08-26 16:31:42 +01:00
gingerBill
96e36c7c39
Minor fix to strconv.unquote_string
2022-03-03 13:54:23 +00:00
gingerBill
1d7c9cf872
Make strconv more robust
2021-12-09 15:35:00 +00:00
gingerBill
ebc09d5e4e
Add i128 and u128 parsers to strconv
2021-09-25 14:30:50 +01:00
gingerBill
ceebd7b23c
Correct context.allocator usage
2021-09-19 11:59:31 +01:00
gingerBill
720884e0f1
Strip even more semicolons if followed by a } or ) on the same line
2021-08-31 23:47:57 +01:00
gingerBill
251da264ed
Remove unneeded semicolons from the core library
2021-08-31 22:21:13 +01:00
gingerBill
86649e6b44
Core library clean up: Make range expressions more consistent and replace uses of .. with ..=
2021-06-14 11:15:25 +01:00
gingerBill
54e6c50769
Implement f16 functionality
2021-04-01 10:06:00 +01:00
gingerBill
b727b6438b
Minimize unneeded casts
2021-03-03 14:31:17 +00:00
gingerBill
aa93305015
Replace usage of inline proc with #force_inline proc in the core library
2021-02-23 16:14:47 +00:00
gingerBill
825c5a963f
Improve fmt's %#v behaviour for nested records
2021-02-04 14:52:23 +00:00