diff options
| author | Raul Alimbekov <[email protected]> | 2025-12-16 09:05:22 +0300 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-16 09:05:22 +0300 |
| commit | c9a04b4b732b7a3b696eb8223664c1a7942b1875 (patch) | |
| tree | 6dbe5c02e66eed8d8762f13f95afd24f8db2b38c /embassy-rp/src/float/functions.rs | |
| parent | cde24a3ef1117653ba5ed4184102b33f745782fb (diff) | |
| parent | 5ae6e060ec1c90561719aabdc29d5b6e7b8b0a82 (diff) | |
Merge branch 'main' into main
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 { |
