const STUB_MSG: &str = "arcis::std::float is documentation-only; \
inside `#[encrypted]` code the interpreter intercepts the real method before this stub runs.";
macro_rules! supported_float {
($t:ident) => {
#[allow(non_camel_case_types)]
#[derive(Debug, Clone, Copy, PartialEq, PartialOrd, Default)]
pub struct $t;
impl $t {
pub fn abs(self) -> Self {
unimplemented!("{STUB_MSG}")
}
/// Returns the smaller of `self` and `other`.
pub fn min(self, other: Self) -> Self {
unimplemented!("{STUB_MSG}")
}
/// Returns the larger of `self` and `other`.
pub fn max(self, other: Self) -> Self {
unimplemented!("{STUB_MSG}")
}
/// Returns `e^self`.
pub fn exp(self) -> Self {
unimplemented!("{STUB_MSG}")
}
/// Returns `2^self`.
pub fn exp2(self) -> Self {
unimplemented!("{STUB_MSG}")
}
/// Returns the natural logarithm of `self`.
pub fn ln(self) -> Self {
unimplemented!("{STUB_MSG}")
}
/// Returns the base-2 logarithm of `self`.
pub fn log2(self) -> Self {
unimplemented!("{STUB_MSG}")
}
/// Returns the square root of `self`.
pub fn sqrt(self) -> Self {
unimplemented!("{STUB_MSG}")
}
}
};
}
supported_float!(f32);
supported_float!(f64);