Skip to content

Commit e71d7a9

Browse files
committed
match standard library float parsing of "-NaN"
1 parent e003ff4 commit e71d7a9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ macro_rules! float_trait_impl {
236236
"inf" => return Ok(core::$t::INFINITY),
237237
"-inf" => return Ok(core::$t::NEG_INFINITY),
238238
"NaN" => return Ok(core::$t::NAN),
239+
"-NaN" => return Ok(-core::$t::NAN),
239240
_ => {},
240241
}
241242

0 commit comments

Comments
 (0)