@@ -1546,20 +1546,16 @@ cdef class Float16:
15461546 """
15471547 return f16_rem(x , y )
15481548
1549- @classmethod
1550- def sqrt(cls , Float16 x ) -> Float16:
1549+ cpdef Float16 sqrt(self ):
15511550 """ Calculates a square root of the IEEE 754 binary16 floating point.
15521551
15531552 The result is the same as that of :func:`f16_sqrt()`.
15541553
1555- Args:
1556- x: The floating point whose square root is to be calculated.
1557-
15581554 Returns:
15591555 The resulted number (``sqrt(x)``).
15601556
15611557 """
1562- return f16_sqrt(x )
1558+ return f16_sqrt(self )
15631559
15641560 @classmethod
15651561 def eq (cls , Float16 x , Float16 y ) -> bool:
@@ -2092,20 +2088,16 @@ cdef class Float32:
20922088 """
20932089 return f32_rem(x , y )
20942090
2095- @classmethod
2096- def sqrt(cls , Float32 x ) -> Float32:
2091+ cpdef Float32 sqrt(self ):
20972092 """ Calculates a square root of the IEEE 754 binary32 floating point.
20982093
20992094 The result is the same as that of :func:`f32_sqrt()`.
21002095
2101- Args:
2102- x: The floating point whose square root is to be calculated.
2103-
21042096 Returns:
21052097 The resulted number (``sqrt(x)``).
21062098
21072099 """
2108- return f32_sqrt(x )
2100+ return f32_sqrt(self )
21092101
21102102 @classmethod
21112103 def eq (cls , Float32 x , Float32 y ) -> bool:
@@ -2633,20 +2625,16 @@ cdef class Float64:
26332625 """
26342626 return f64_rem(x , y )
26352627
2636- @classmethod
2637- def sqrt(cls , Float64 x ) -> Float64:
2628+ cpdef Float64 sqrt(self ):
26382629 """ Calculates a square root of the IEEE 754 binary64 floating point.
26392630
26402631 The result is the same as that of :func:`f64_sqrt()`.
26412632
2642- Args:
2643- x: The floating point whose square root is to be calculated.
2644-
26452633 Returns:
26462634 The resulted number (``sqrt(x)``).
26472635
26482636 """
2649- return f64_sqrt(x )
2637+ return f64_sqrt(self )
26502638
26512639 @classmethod
26522640 def eq (cls , Float64 x , Float64 y ) -> bool:
@@ -3210,20 +3198,16 @@ cdef class Float128:
32103198 """
32113199 return f128_rem(x , y )
32123200
3213- @classmethod
3214- def sqrt(cls , Float128 x ) -> Float128:
3201+ cpdef Float128 sqrt(self ):
32153202 """ Calculates a square root of the IEEE 754 binary128 floating point.
32163203
32173204 The result is the same as that of :func:`f128_sqrt()`.
32183205
3219- Args:
3220- x: The floating point whose square root is to be calculated.
3221-
32223206 Returns:
32233207 The resulted number (``sqrt(x)``).
32243208
32253209 """
3226- return f128_sqrt(x )
3210+ return f128_sqrt(self )
32273211
32283212 @classmethod
32293213 def eq (cls , Float128 x , Float128 y ) -> bool:
0 commit comments