diff options
| author | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
|---|---|---|
| committer | Matteo Meluzzi <[email protected]> | 2025-10-24 15:48:34 +0200 |
| commit | 7976f950b0de72c521f92efa350c67ccd197fab9 (patch) | |
| tree | 8759312eb000de09b92a4921f476d5c16b7e7342 /embassy-rp/src/float/functions.rs | |
| parent | 828a8df18d04877df1f55f04354980b28ff2f2f8 (diff) | |
Merge branch 'main' into 17-add-support-for-boot-protocol
Diffstat (limited to 'embassy-rp/src/float/functions.rs')
| -rw-r--r-- | embassy-rp/src/float/functions.rs | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/embassy-rp/src/float/functions.rs b/embassy-rp/src/float/functions.rs index de29ce336..170168237 100644 --- a/embassy-rp/src/float/functions.rs +++ b/embassy-rp/src/float/functions.rs | |||
| @@ -114,19 +114,11 @@ fn sqrt<F: Float + ROMFunctions>(f: F) -> F { | |||
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | fn ln<F: Float + ROMFunctions>(f: F) -> F { | 116 | fn ln<F: Float + ROMFunctions>(f: F) -> F { |
| 117 | if is_negative_nonzero_or_nan(f) { | 117 | if is_negative_nonzero_or_nan(f) { F::NAN } else { f.ln() } |
| 118 | F::NAN | ||
| 119 | } else { | ||
| 120 | f.ln() | ||
| 121 | } | ||
| 122 | } | 118 | } |
| 123 | 119 | ||
| 124 | fn exp<F: Float + ROMFunctions>(f: F) -> F { | 120 | fn exp<F: Float + ROMFunctions>(f: F) -> F { |
| 125 | if f.is_nan() { | 121 | if f.is_nan() { F::NAN } else { f.exp() } |
| 126 | F::NAN | ||
| 127 | } else { | ||
| 128 | f.exp() | ||
| 129 | } | ||
| 130 | } | 122 | } |
| 131 | 123 | ||
| 132 | fn sin<F: Float + ROMFunctions>(f: F) -> F { | 124 | fn sin<F: Float + ROMFunctions>(f: F) -> F { |
