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
type Fixed = fixed::types::I32F32;
fn main() {
let y = Fixed::overflowing_from_str("0.3333392185").unwrap().0;
let x = Fixed::overflowing_from_str("-0.0000000002").unwrap().0;
println!("{}, {}", x, y);
let res = cordic::atan2(y, x);
}
Error
x=-0.0000000002, y=0.3333392185
thread 'main' panicked at 'attempt to add with overflow', /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\library\core\src\ops\arith.rs:133:1
stack backtrace:
0: std::panicking::begin_panic_handler
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\std\src\panicking.rs:584
1: core::panicking::panic_fmt
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\core\src\panicking.rs:143
2: core::panicking::panic
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\/library\core\src\panicking.rs:48
3: core::ops::arith::impl$10::add
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\library\core\src\ops\arith.rs:126
4: fixed::arith::impl$1870::add<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm,typenum::bit::B1>,typenum::bit::B0>,typenum::bit::B0>,typenum::bit::B0>,typenum::bit:
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\fixed-1.15.0\src\arith.rs:118
5: cordic::cordic_circular<fixed::FixedI64<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm,typenum::bit::B1>,typenum::bit::B0>,typenum::bit::B0>,typenum::bit::B0>,ty
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cordic-0.1.5\src\lib.rs:36
6: cordic::atan<fixed::FixedI64<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm,typenum::bit::B1>,typenum::bit::B0>,typenum::bit::B0>,typenum::bit::B0>,typenum::bit:
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cordic-0.1.5\src\lib.rs:121
7: cordic::atan2<fixed::FixedI64<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UInt<typenum::uint::UTerm,typenum::bit::B1>,typenum::bit::B0>,typenum::bit::B0>,typenum::bit::B0>,typenum::bit
at C:\Users\user\.cargo\registry\src\github.com-1ecc6299db9ec823\cordic-0.1.5\src\lib.rs:145
8: cordic_test::main
at .\src\main.rs:7
9: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
at /rustc/7737e0b5c4103216d6fd8cf941b7ab9bdbaace7c\library\core\src\ops\function.rs:227
The text was updated successfully, but these errors were encountered:
Example
Error
The text was updated successfully, but these errors were encountered: