pub struct ExceptionFlags(/* private fields */);
Expand description
exception flags defined by standard
§Examples
use softfloat_wrapper::{ExceptionFlags, Float, RoundingMode, F16};
let a = 0x0;
let b = 0x0;
let a = F16::from_bits(a);
let b = F16::from_bits(b);
let mut flag = ExceptionFlags::default();
flag.set();
let _d = a.div(b, RoundingMode::TiesToEven);
flag.get();
assert!(flag.is_invalid());
Implementations§
Source§impl ExceptionFlags
impl ExceptionFlags
pub fn from_bits(x: u8) -> Self
pub fn to_bits(&self) -> u8
pub fn bits(&self) -> u8
👎Deprecated since 0.3.0: Please use to_bits instead
pub fn is_inexact(&self) -> bool
pub fn is_infinite(&self) -> bool
pub fn is_invalid(&self) -> bool
pub fn is_overflow(&self) -> bool
pub fn is_underflow(&self) -> bool
pub fn set(&self)
pub fn get(&mut self)
Trait Implementations§
Source§impl Clone for ExceptionFlags
impl Clone for ExceptionFlags
Source§fn clone(&self) -> ExceptionFlags
fn clone(&self) -> ExceptionFlags
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ExceptionFlags
impl Debug for ExceptionFlags
Source§impl Default for ExceptionFlags
impl Default for ExceptionFlags
Source§fn default() -> ExceptionFlags
fn default() -> ExceptionFlags
Returns the “default value” for a type. Read more
impl Copy for ExceptionFlags
Auto Trait Implementations§
impl Freeze for ExceptionFlags
impl RefUnwindSafe for ExceptionFlags
impl Send for ExceptionFlags
impl Sync for ExceptionFlags
impl Unpin for ExceptionFlags
impl UnwindSafe for ExceptionFlags
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more