mod basic;
pub(super) use basic::*;
pub mod not;
mod neg;
pub use neg::*;
mod add1;
pub use add1::*;
pub mod sub1;
pub use sub1::*;
mod add;
pub use add::*;
mod sub;
pub use sub::*;
mod mul;
pub use mul::*;
mod div;
pub use div::*;
pub(super) mod shl;
pub(super) mod shr;
pub(super) mod standardization;
pub type Const<const N: i32> = <Constant<N> as ToInt>::Output;
pub struct Constant<const N: i32>;
pub trait ToInt {
type Output;
}
impl ToInt for Constant<0> {
type Output = Z0; }
impl ToInt for Constant<1> {
type Output = P1;
}
impl ToInt for Constant<2> {
type Output = B0<P1>;
}
impl ToInt for Constant<3> {
type Output = P1;
}
impl ToInt for Constant<4> {
type Output = B0<B0<Z0>>;
}
impl ToInt for Constant<5> {
type Output = B1<B0<Z0>>;
}
impl ToInt for Constant<6> {
type Output = B0<P1>;
}
impl ToInt for Constant<7> {
type Output = B1<P1>;
}
impl ToInt for Constant<8> {
type Output = B0<B0<B0<Z0>>>;
}
impl ToInt for Constant<9> {
type Output = B1<B0<B0<Z0>>>;
}
impl ToInt for Constant<10> {
type Output = B0<B1<B0<Z0>>>;
}
impl ToInt for Constant<11> {
type Output = B1<B1<B0<Z0>>>;
}
impl ToInt for Constant<12> {
type Output = B0<B0<P1>>;
}
impl ToInt for Constant<13> {
type Output = B1<B0<P1>>;
}
impl ToInt for Constant<14> {
type Output = B0<B1<P1>>;
}
impl ToInt for Constant<15> {
type Output = B1<B1<P1>>;
}
impl ToInt for Constant<16> {
type Output = B0<B0<B0<B0<Z0>>>>;
}
impl ToInt for Constant<17> {
type Output = B1<B0<B0<B0<Z0>>>>;
}
impl ToInt for Constant<18> {
type Output = B0<B1<B0<B0<Z0>>>>;
}
impl ToInt for Constant<19> {
type Output = B1<B1<B0<B0<Z0>>>>;
}
impl ToInt for Constant<20> {
type Output = B0<B0<B1<B0<Z0>>>>;
}
impl ToInt for Constant<21> {
type Output = B1<B0<B1<B0<Z0>>>>;
}
impl ToInt for Constant<22> {
type Output = B0<B1<B1<B0<Z0>>>>;
}
impl ToInt for Constant<23> {
type Output = B1<B1<B1<B0<Z0>>>>;
}
impl ToInt for Constant<24> {
type Output = B0<B0<B0<P1>>>;
}
impl ToInt for Constant<25> {
type Output = B1<B0<B0<P1>>>;
}
impl ToInt for Constant<26> {
type Output = B0<B1<B0<P1>>>;
}
impl ToInt for Constant<27> {
type Output = B1<B1<B0<P1>>>;
}
impl ToInt for Constant<28> {
type Output = B0<B0<B1<P1>>>;
}
impl ToInt for Constant<29> {
type Output = B1<B0<B1<P1>>>;
}
impl ToInt for Constant<30> {
type Output = B0<B1<B1<P1>>>;
}
impl ToInt for Constant<31> {
type Output = B1<B1<B1<P1>>>;
}
impl ToInt for Constant<32> {
type Output = B0<B0<B0<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<33> {
type Output = B1<B0<B0<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<34> {
type Output = B0<B1<B0<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<35> {
type Output = B1<B1<B0<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<36> {
type Output = B0<B0<B1<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<37> {
type Output = B1<B0<B1<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<38> {
type Output = B0<B1<B1<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<39> {
type Output = B1<B1<B1<B0<B0<Z0>>>>>;
}
impl ToInt for Constant<40> {
type Output = B0<B0<B0<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<41> {
type Output = B1<B0<B0<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<42> {
type Output = B0<B1<B0<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<43> {
type Output = B1<B1<B0<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<44> {
type Output = B0<B0<B1<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<45> {
type Output = B1<B0<B1<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<46> {
type Output = B0<B1<B1<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<47> {
type Output = B1<B1<B1<B1<B0<Z0>>>>>;
}
impl ToInt for Constant<48> {
type Output = B0<B0<B0<B0<P1>>>>;
}
impl ToInt for Constant<49> {
type Output = B1<B0<B0<B0<P1>>>>;
}
impl ToInt for Constant<50> {
type Output = B0<B1<B0<B0<P1>>>>;
}
impl ToInt for Constant<51> {
type Output = B1<B1<B0<B0<P1>>>>;
}
impl ToInt for Constant<52> {
type Output = B0<B0<B1<B0<P1>>>>;
}
impl ToInt for Constant<53> {
type Output = B1<B0<B1<B0<P1>>>>;
}
impl ToInt for Constant<54> {
type Output = B0<B1<B1<B0<P1>>>>;
}
impl ToInt for Constant<55> {
type Output = B1<B1<B1<B0<P1>>>>;
}
impl ToInt for Constant<56> {
type Output = B0<B0<B0<B1<P1>>>>;
}
impl ToInt for Constant<57> {
type Output = B1<B0<B0<B1<P1>>>>;
}
impl ToInt for Constant<58> {
type Output = B0<B1<B0<B1<P1>>>>;
}
impl ToInt for Constant<59> {
type Output = B1<B1<B0<B1<P1>>>>;
}
impl ToInt for Constant<60> {
type Output = B0<B0<B1<B1<P1>>>>;
}
impl ToInt for Constant<61> {
type Output = B1<B0<B1<B1<P1>>>>;
}
impl ToInt for Constant<62> {
type Output = B0<B1<B1<B1<P1>>>>;
}
impl ToInt for Constant<63> {
type Output = B1<B1<B1<B1<P1>>>>;
}
impl ToInt for Constant<64> {
type Output = B0<B0<B0<B0<B0<B0<Z0>>>>>>;
}
impl ToInt for Constant<-1> {
type Output = N1;
}
impl ToInt for Constant<-2> {
type Output = B0<N1>;
}
impl ToInt for Constant<-3> {
type Output = B1<B0<N1>>;
}
impl ToInt for Constant<-4> {
type Output = B0<B0<N1>>;
}
impl ToInt for Constant<-5> {
type Output = B1<B1<B0<N1>>>;
}
impl ToInt for Constant<-6> {
type Output = B0<B1<B0<N1>>>;
}
impl ToInt for Constant<-7> {
type Output = B1<B0<B0<N1>>>;
}
impl ToInt for Constant<-8> {
type Output = B0<B0<B0<N1>>>;
}
impl ToInt for Constant<-9> {
type Output = B1<B1<B1<B0<N1>>>>;
}
impl ToInt for Constant<-10> {
type Output = B0<B1<B1<B0<N1>>>>;
}
impl ToInt for Constant<-11> {
type Output = B1<B0<B1<B0<N1>>>>;
}
impl ToInt for Constant<-12> {
type Output = B0<B0<B1<B0<N1>>>>;
}
impl ToInt for Constant<-13> {
type Output = B1<B1<B0<B0<N1>>>>;
}
impl ToInt for Constant<-14> {
type Output = B0<B1<B0<B0<N1>>>>;
}
impl ToInt for Constant<-15> {
type Output = B1<B0<B0<B0<N1>>>>;
}
impl ToInt for Constant<-16> {
type Output = B0<B0<B0<B0<N1>>>>;
}
impl ToInt for Constant<-17> {
type Output = B1<B1<B1<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-18> {
type Output = B0<B1<B1<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-19> {
type Output = B1<B0<B1<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-20> {
type Output = B0<B0<B1<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-21> {
type Output = B1<B1<B0<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-22> {
type Output = B0<B1<B0<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-23> {
type Output = B1<B0<B0<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-24> {
type Output = B0<B0<B0<B1<B0<N1>>>>>;
}
impl ToInt for Constant<-25> {
type Output = B1<B1<B1<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-26> {
type Output = B0<B1<B1<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-27> {
type Output = B1<B0<B1<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-28> {
type Output = B0<B0<B1<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-29> {
type Output = B1<B1<B0<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-30> {
type Output = B0<B1<B0<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-31> {
type Output = B1<B0<B0<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-32> {
type Output = B0<B0<B0<B0<B0<N1>>>>>;
}
impl ToInt for Constant<-33> {
type Output = B1<B1<B1<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-34> {
type Output = B0<B1<B1<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-35> {
type Output = B1<B0<B1<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-36> {
type Output = B0<B0<B1<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-37> {
type Output = B1<B1<B0<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-38> {
type Output = B0<B1<B0<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-39> {
type Output = B1<B0<B0<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-40> {
type Output = B0<B0<B0<B1<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-41> {
type Output = B1<B1<B1<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-42> {
type Output = B0<B1<B1<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-43> {
type Output = B1<B0<B1<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-44> {
type Output = B0<B0<B1<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-45> {
type Output = B1<B1<B0<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-46> {
type Output = B0<B1<B0<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-47> {
type Output = B1<B0<B0<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-48> {
type Output = B0<B0<B0<B0<B1<B0<N1>>>>>>;
}
impl ToInt for Constant<-49> {
type Output = B1<B1<B1<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-50> {
type Output = B0<B1<B1<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-51> {
type Output = B1<B0<B1<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-52> {
type Output = B0<B0<B1<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-53> {
type Output = B1<B1<B0<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-54> {
type Output = B0<B1<B0<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-55> {
type Output = B1<B0<B0<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-56> {
type Output = B0<B0<B0<B1<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-57> {
type Output = B1<B1<B1<B0<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-58> {
type Output = B0<B1<B1<B0<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-59> {
type Output = B1<B0<B1<B0<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-60> {
type Output = B0<B0<B1<B0<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-61> {
type Output = B1<B1<B0<B0<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-62> {
type Output = B0<B1<B0<B0<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-63> {
type Output = B1<B0<B0<B0<B0<B0<N1>>>>>>;
}
impl ToInt for Constant<-64> {
type Output = B0<B0<B0<B0<B0<B0<N1>>>>>>;
}