micromath icon indicating copy to clipboard operation
micromath copied to clipboard

Support for f64?

Open ChristopherRabotin opened this issue 3 years ago • 1 comments

Hi there,

Is there any interest in supporting f64 in this crate? I am interested in converting a high precision scientific time computation library to no_std, but it requires 64-bit floating point values and a few functions (sin, div_euclid, and rem_euclid). I'd be happy to give it a shot.

Moreover, and maybe that should be a separate issue, using a Pade approximation for the cosine computation might increase the precision of the result if that is desired.

Cheers

ChristopherRabotin avatar Mar 09 '22 00:03 ChristopherRabotin

Is there any interest in supporting f64 in this crate?

Sure, that'd be great.

using a Pade approximation for the cosine computation might increase the precision of the result if that is desired.

If you'd like to attempt PoCing it, we can examine the precision/performance tradeoffs and determine if it's worth it.

However note that cosine is pretty much the core of the bulk of the trig functionality in this crate and the current approximation is highly optimized, albeit a bit lacking in precision.

tarcieri avatar Mar 09 '22 17:03 tarcieri