This repository was archived by the owner on Apr 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 77
77
*/
78
78
79
79
use core:: f64;
80
- use core:: num:: Wrapping ;
81
-
82
- const TINY : f64 = 1.0e-300 ;
83
80
84
81
#[ cfg_attr( all( test, assert_no_panic) , no_panic:: no_panic) ]
85
82
pub fn sqrt ( x : f64 ) -> f64 {
@@ -112,6 +109,10 @@ pub fn sqrt(x: f64) -> f64 {
112
109
}
113
110
#[ cfg( not( target_feature = "sse2" ) ) ]
114
111
{
112
+ use core:: num:: Wrapping ;
113
+
114
+ const TINY : f64 = 1.0e-300 ;
115
+
115
116
let mut z: f64 ;
116
117
let sign: Wrapping < u32 > = Wrapping ( 0x80000000 ) ;
117
118
let mut ix0: i32 ;
Original file line number Diff line number Diff line change 13
13
* ====================================================
14
14
*/
15
15
16
- const TINY : f32 = 1.0e-30 ;
17
-
18
16
#[ cfg_attr( all( test, assert_no_panic) , no_panic:: no_panic) ]
19
17
pub fn sqrtf ( x : f32 ) -> f32 {
20
18
// On wasm32 we know that LLVM's intrinsic will compile to an optimized
@@ -46,6 +44,8 @@ pub fn sqrtf(x: f32) -> f32 {
46
44
}
47
45
#[ cfg( not( target_feature = "sse" ) ) ]
48
46
{
47
+ const TINY : f32 = 1.0e-30 ;
48
+
49
49
let mut z: f32 ;
50
50
let sign: i32 = 0x80000000u32 as i32 ;
51
51
let mut ix: i32 ;
You can’t perform that action at this time.
0 commit comments