pishleback/Algebraeon

More operations between Natural, Integer, Rational and builtin types

开放

#54 创建于 2025年5月15日

 (5 条评论) (0 个反应) (0 位负责人)Rust (10 个派生)auto 404
enhancementgood first issue

仓库指标

星标
 (83 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

As discussed in #52 it is currently a bit messy to compute the remainder of a Natural by a u32 and obtain a u32, though it is possible by converting Natural to usize first. This issue is for adding more conversions and operations involving a mixture of algebraeons Natural, Integer and Rational types with rusts builtin u8, u16, u32, u64, u128, usize, i8, i16, i32, i64, i128 and isize where appropriate.

  • TryInto<u8 ... u128, usize, i8 ... i128, isize> for Natural (#55)
  • TryInto<u8 ... u128, usize, i8 ... i128, isize> for Integer (#55)
  • TryInto<u8 ... u128, usize, i8 ... i128, isize> for Rational (#81)
  • Natural % T -> T for T = i8 ... i128, isize,u8...u128,usize
  • Integer % T -> T for T = i8 ... i128, isize,u8...u128,usize

Any others to include on the list?

贡献者指南