-
Notifications
You must be signed in to change notification settings - Fork 16
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
Adding support for Lambert W function? #14
Comments
Hello, in general, the more, the merrier. I am just worried about how you would like to add it here. Do you propose to add a dependency on that crate or reinstantiate here? |
Initially I thought adding a dependency would probably be simpler, but I see this crate is |
Yeah, there is this complication. Speaking of |
Yeah, it would add a dependency though, and I don't know how to judge that trade-off. But it would make the crate much more accessible. I am currently trying to make |
Sorry for asking you about my own crate on here actually. Would it be interesting to reinstantiate the code in this crate with a reference to Fukushima's paper and my crate? |
Yeah, I do not think it is possible either. Perhaps you can do the other way around by having
Well, as much as I want this crate to be independent, it would create duplication in the ecosystem. Someone would have to maintain it in two places. |
If I manage a good |
Yes, I think it would be logical to just add a dependency, as long as that dependency is minimal. But I think the interface would have to be different here to play along with the other special functions, that is, to introduce a trait ( |
Yeah, I think either |
My current solution for The default state would be to have |
The problem with default features is that they cannot be opted out from in dependent crates: rust-lang/cargo#2823. So if In the case of |
Yeah, that's the problem I'm running into with my own dependencies, and is why this was the only solution I could come up with. |
Yeah, having none enabled is not user friendly either. But what is the problem with having a And in general, whey do you need |
I don't really need the standard library, but the crate is a direct dependency in other crates that do use it and want to minimize the dependency tree, so I want to provide the option. I don't think having only a |
Another reason for keeping the standard library around is that, since |
But then I would just mimic the feature structure in the dependency, as you proposed above. The dependent crates will have to deal with it themselves. |
I've made the crate |
Great work! By the way, did you by any change compare the performance of If you would like to try to expose it via |
I did compare them! The standard library makes the functions around 10 to 20% faster on random inputs (I haven't benchmarked fixed inputs yet). Then it makes sense to use omega, quite satisfying. I agree on using the 50-bit versions. While the 24-bit versions are faster they are only around 5 to 15% faster. I have been thinking about converting the 24-bit versions into using f32, since that's the size of their mantissa. But that would require a rewrite and a breaking change, so I think beginning with just the 50-bit versions for f64 is a good idea. |
That is a significant difference. Just pushed support for https://github.com/stainless-steel/special/actions/runs/10300025351/job/28508574173 Might be good to keep it anyway. |
I recently finished an implementation of the method of Toshio Fukushima for evaluating the Lambert W function quickly and accurately.
Would it be interesting to integrate this functionality here?
The text was updated successfully, but these errors were encountered: