-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implementing the Lambert W function? #64
Comments
Hello @JSorngard, Thank you for your interest in Puruspe and for your excellent suggestion! I've had a chance to look at your Lambert W function implementation in your GitHub repository, and I'm truly impressed. Your clean, dependency-free Rust code aligns perfectly with Puruspe's philosophy. I'm very excited about the possibility of integrating your implementation of the Lambert W function into puruspe. The use of Toshio Fukushima's fast and accurate method sounds like it would be a great addition to our special function capabilities. I'd be delighted if you could submit a pull request with your implementation. Feel free to include any tests or documentation you think would be helpful. If you need any assistance with the integration process or have any questions about our project structure, please don't hesitate to ask. Once again, thank you for your valuable contribution offer. Your work could significantly enhance puruspe's functionality, and I'm looking forward to the possibility of including it. Best regards, |
Thank you for your comment! I just have a few questions: Would it make sense to just use If not I'll make a fork and start integrating parts of it here during the coming days, but then I have two more questions:
|
Thank you for your questions. I appreciate your thoughtfulness in approaching this integration. Let me address each of your points:
What do you think about aligning the Lambert W functions with Peroxide's existing structure in this way? Feel free to suggest any modifications to the names or structure - these are just initial ideas to get us started. |
Thank you for the feedback! I have a question about implementing two different versions, one in pub use crate::special::function::*; This means that whatever function is implemented in the I can think of a five approaches:
None of these feel perfect to me. |
Thank you for your insightful question about the implementation structure. Your attention to the architectural details is much appreciated. You've raised a valid point about the current import strategy in
This approach has worked well for us in maintaining both flexibility and simplicity where needed. Given this context, here's what I propose for the Lambert W implementation:
This way, However, I want to emphasize that this is just a suggestion based on our current structure. If you feel this approach is overly complex for your implementation, I'm completely open to your original proposal of implementing just the 24-bit precision version, which offers a good balance of accuracy and speed. This simpler approach would work well as a wrapper in What are your thoughts on these options? Feel free to choose the approach you're most comfortable with, or suggest any modifications. The goal is to integrate your excellent work in a way that fits well with Peroxide's structure and is maintainable for you. |
Ah, I didn't see the The only additional suggestion I have then is to use the accurate versions in The speed difference between the 24 and 50 bit versions (when benchmarked on my machine) are around 15 to 25%, but they both take on the order of single digit nanoseconds to execute. |
Thank you for your feedback and additional suggestion. I completely agree with your perspective. You're absolutely right - using the more accurate 50-bit version in If you're happy with this plan, feel free to proceed with the implementation. If you have any further thoughts or questions, please don't hesitate to share them. |
One more thing - if you're comfortable with it, I'd like to transfer this issue to the Peroxide repository. This would help us keep track of the implementation process and allow other contributors to follow along or provide input if needed. Would that be okay with you? If you agree, I'll go ahead and make the transfer. |
That sounds like a good idea. |
Completed in #63. |
Update `puruspe` dependency, remove `lambert_w` dependency (#64)
Hi!
Thank you for this nice crate!
I recently finished an implementation of the Lambert W function using the fast and accurate method of Toshio Fukushima. Would it be interesting to integrate this to the special function capabilities of this crate?
The text was updated successfully, but these errors were encountered: