File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,13 @@ quad_absolute(const Sleef_quad *op)
3737 return Sleef_fabsq1 (*op);
3838}
3939
40+ static inline Sleef_quad
41+ quad_conjugate (const Sleef_quad *op)
42+ {
43+ // For real numbers, conjugate is the identity function (no-op)
44+ return *op;
45+ }
46+
4047static inline Sleef_quad
4148quad_rint (const Sleef_quad *op)
4249{
@@ -217,6 +224,13 @@ ld_absolute(const long double *op)
217224 return fabsl (*op);
218225}
219226
227+ static inline long double
228+ ld_conjugate (const long double *op)
229+ {
230+ // For real numbers, conjugate is the identity function (no-op)
231+ return *op;
232+ }
233+
220234static inline long double
221235ld_sign (const long double *op)
222236{
Original file line number Diff line number Diff line change @@ -161,6 +161,11 @@ init_quad_unary_ops(PyObject *numpy)
161161 if (create_quad_unary_ufunc<quad_absolute, ld_absolute>(numpy, " fabs" ) < 0 ) {
162162 return -1 ;
163163 }
164+ // conjugate is a no-op for real numbers (returns the value unchanged)
165+ if (create_quad_unary_ufunc<quad_conjugate, ld_conjugate>(numpy, " conjugate" ) < 0 ) {
166+ return -1 ;
167+ }
168+ // conj is an alias for conjugate, no need to register
164169 if (create_quad_unary_ufunc<quad_sign, ld_sign>(numpy, " sign" ) < 0 ) {
165170 return -1 ;
166171 }
Original file line number Diff line number Diff line change 2727| rint | ✅ | ✅ |
2828| sign | ✅ | ✅ |
2929| heaviside | | |
30- | conj | | |
31- | conjugate | | |
30+ | conj | ✅ | ✅ |
31+ | conjugate | ✅ | ✅ |
3232| exp | ✅ | ✅ |
3333| exp2 | ✅ | ✅ |
3434| log | ✅ | ✅ |
You can’t perform that action at this time.
0 commit comments