Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing traits #13

Open
benruijl opened this issue Mar 19, 2019 · 10 comments
Open

Add missing traits #13

benruijl opened this issue Mar 19, 2019 · 10 comments

Comments

@benruijl
Copy link
Contributor

Some common traits are missing, such as Display, Debug, Default and Inv.

@jkarns275
Copy link
Owner

I can do this over the next day or two. What is the Inv trait?

@benruijl
Copy link
Contributor Author

It's the inverse

@benruijl
Copy link
Contributor Author

I've added the traits in my own version:
benruijl@cc2069b

The Display needs some work though in order to prevent allocating.

@benruijl
Copy link
Contributor Author

In order for f128 to be used in num::Complex it also needs to implement Rem and RemAssign.

@benruijl
Copy link
Contributor Author

I've added some more (half-implemented) traits in my fork. num_traits::MulAdd is still missing.

@jkarns275
Copy link
Owner

There is a mul-add function included with the GCC library, so it shouldnt be hard to implement

@jkarns275
Copy link
Owner

I've added the Display trait. It isn't fully implemented but you can specify a precision. There is no option for scientific / exponential notation yet

@oscargus
Copy link

oscargus commented Nov 9, 2023

Bumping this to ask for the LowerExp and probably UpperExp traits (as pointed out above, for scientific/exponential notation). (I may even try to dig into it myself.)

@jkarns275
Copy link
Owner

jkarns275 commented Nov 9, 2023 via email

@PanieriLorenzo
Copy link

another useful trait that I miss is Bounded from num: https://docs.rs/num-traits/latest/num_traits/bounds/trait.Bounded.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants