json-rust icon indicating copy to clipboard operation
json-rust copied to clipboard

get_cached_power() overflows

Open totikom opened this issue 4 years ago • 2 comments

get_cached_power(754645927552678136);
get_cached_power(5932085134177075026);
// and similar overflows

Error message: thread 'main' panicked at 'index out of bounds: the len is 87 but the index is 5932085134177075026', /<path ommited>/json-rust/src/util/diyfp.rs:226:16

totikom avatar Feb 02 '21 18:02 totikom

UPD: get_cached_power_by_index() also overflows with similar error.

totikom avatar Feb 02 '21 18:02 totikom

UPD2: exponentiate_f32() and exponentiate_f64() crash with thread 'main' panicked at 'attempt to negate with overflow', /<path ommited>/json-rust/src/number.rs:283:21

totikom avatar Feb 02 '21 18:02 totikom