@@ -1215,6 +1215,15 @@ class Float16:
12151215 """
12161216 ...
12171217
1218+ def neg (self ) -> Self :
1219+ """Negates the IEEE 754 binary16 floating point.
1220+
1221+ Returns:
1222+ The resulted number (``-x``).
1223+
1224+ """
1225+ ...
1226+
12181227 @classmethod
12191228 def add (cls , x : Self , y : Self ) -> Self :
12201229 """Adds the IEEE 754 binary16 floating points.
@@ -1717,6 +1726,15 @@ class Float32:
17171726 """
17181727 ...
17191728
1729+ def neg (self ) -> Self :
1730+ """Negates the IEEE 754 binary32 floating point.
1731+
1732+ Returns:
1733+ The resulted number (``-x``).
1734+
1735+ """
1736+ ...
1737+
17201738 @classmethod
17211739 def add (cls , x : Self , y : Self ) -> Self :
17221740 """Adds the IEEE 754 binary32 floating points.
@@ -2208,6 +2226,15 @@ class Float64:
22082226 """
22092227 ...
22102228
2229+ def neg (self ) -> Self :
2230+ """Negates the IEEE 754 binary64 floating point.
2231+
2232+ Returns:
2233+ The resulted number (``-x``).
2234+
2235+ """
2236+ ...
2237+
22112238 @classmethod
22122239 def add (cls , x : Self , y : Self ) -> Self :
22132240 """Adds the IEEE 754 binary64 floating points.
@@ -2711,6 +2738,15 @@ class Float128:
27112738 """
27122739 ...
27132740
2741+ def neg (self ) -> Self :
2742+ """Negates the IEEE 754 binary128 floating point.
2743+
2744+ Returns:
2745+ The resulted number (``-x``).
2746+
2747+ """
2748+ ...
2749+
27142750 @classmethod
27152751 def add (cls , x : Self , y : Self ) -> Self :
27162752 """Adds the IEEE 754 binary128 floating points.
@@ -3410,6 +3446,19 @@ def f16_round_to_int(
34103446 ...
34113447
34123448
3449+ def f16_neg (x : Float16 ) -> Float16 :
3450+ """Negates the IEEE 754 binary16 floating point.
3451+
3452+ Args:
3453+ x: The floating point to be negated.
3454+
3455+ Returns:
3456+ The resulted number expressed as an IEEE 754 binary16 floating point (``-x``).
3457+
3458+ """
3459+ ...
3460+
3461+
34133462def f16_add (x : Float16 , y : Float16 ) -> Float16 :
34143463 """Adds the IEEE 754 binary16 floating points.
34153464
@@ -3779,6 +3828,19 @@ def f32_round_to_int(
37793828 ...
37803829
37813830
3831+ def f32_neg (x : Float32 ) -> Float32 :
3832+ """Negates the IEEE 754 binary32 floating point.
3833+
3834+ Args:
3835+ x: The floating point to be negated.
3836+
3837+ Returns:
3838+ The resulted number expressed as an IEEE 754 binary32 floating point (``-x``).
3839+
3840+ """
3841+ ...
3842+
3843+
37823844def f32_add (x : Float32 , y : Float32 ) -> Float32 :
37833845 """Adds the IEEE 754 binary32 floating points.
37843846
@@ -4109,6 +4171,19 @@ def f64_round_to_int(
41094171 ...
41104172
41114173
4174+ def f64_neg (x : Float64 ) -> Float64 :
4175+ """Negates the IEEE 754 binary64 floating point.
4176+
4177+ Args:
4178+ x: The floating point to be negated.
4179+
4180+ Returns:
4181+ The resulted number expressed as an IEEE 754 binary64 floating point (``-x``).
4182+
4183+ """
4184+ ...
4185+
4186+
41124187def f64_add (x : Float64 , y : Float64 ) -> Float64 :
41134188 """Adds the IEEE 754 binary64 floating points.
41144189
@@ -4439,6 +4514,19 @@ def f128_round_to_int(
44394514 ...
44404515
44414516
4517+ def f128_neg (x : Float128 ) -> Float128 :
4518+ """Negates the IEEE 754 binary128 floating point.
4519+
4520+ Args:
4521+ x: The floating point to be negated.
4522+
4523+ Returns:
4524+ The resulted number expressed as an IEEE 754 binary128 floating point (``-x``).
4525+
4526+ """
4527+ ...
4528+
4529+
44424530def f128_add (x : Float128 , y : Float128 ) -> Float128 :
44434531 """Adds the IEEE 754 binary128 floating points.
44444532
0 commit comments