# HG changeset patch
# User Jonathan Bober <bober@umich.edu>
# Date 1187892208 14400
# Node ID 76e3ea40f96aff4022ef96f9ea323fe07f43e3d5
# Parent 752e1d1cba0d9a3c9e856f5b3eb071395fbf37c6
Fixes for the quaddouble wrapper so that it always properly resets
the fpu precision (on x86 machines).
diff -r 752e1d1cba0d -r 76e3ea40f96a sage/rings/real_rqdf.pxd
a
|
b
|
cdef class RealQuadDoubleField_class(Fie |
112 | 112 | # so it is possible to make weakrefs to this finite field |
113 | 113 | cdef object __weakref__ |
114 | 114 | # round-to-double bit |
115 | | cdef unsigned int *cwf |
116 | 115 | |
117 | 116 | cdef class QuadDoubleElement(FieldElement): |
118 | 117 | cdef qd *initptr # |
119 | 118 | # round-to-double bit |
120 | | cdef unsigned int *cw |
121 | 119 | |
122 | 120 | cdef _set(self,x) |
123 | 121 | cdef _new(self) |
diff -r 752e1d1cba0d -r 76e3ea40f96a sage/rings/real_rqdf.pyx
a
|
b
|
Mixing of symbolic an quad double elemen |
33 | 33 | 0.868588963806503655302257837833210164588794011607333132228907565 |
34 | 34 | |
35 | 35 | """ |
| 36 | |
36 | 37 | |
37 | 38 | #***************************************************************************** |
38 | 39 | # |
… |
… |
from sage.rings.real_mpfr cimport RealNu |
84 | 85 | |
85 | 86 | from sage.structure.parent_base cimport ParentWithBase |
86 | 87 | from sage.structure.parent_gens cimport ParentWithGens |
87 | | |
88 | | cdef extern from "rqdf_fix.h": pass |
89 | 88 | |
90 | 89 | cdef qd *qd_from_mpz(mpz_t z): |
91 | 90 | cdef double d[4] |
… |
… |
cdef class RealQuadDoubleField_class(Fie |
148 | 147 | """ |
149 | 148 | |
150 | 149 | def __init__(self): |
151 | | fpu_fix_start(self.cwf) |
152 | | |
| 150 | pass |
| 151 | |
153 | 152 | def __dealloc__(self): |
154 | | fpu_fix_end(self.cwf) |
155 | | |
| 153 | pass |
| 154 | |
156 | 155 | def is_exact(self): |
157 | 156 | return False |
158 | 157 | |
… |
… |
cdef class RealQuadDoubleField_class(Fie |
315 | 314 | |
316 | 315 | s = <char*>PyMem_Malloc(63+8) # See docs for write() |
317 | 316 | _sig_on |
| 317 | cdef unsigned int cw |
| 318 | fpu_fix_start(&cw) |
318 | 319 | z._pi.write(s,63,0,0) |
| 320 | fpu_fix_end(&cw) |
319 | 321 | _sig_off |
320 | 322 | t = str(s) |
321 | 323 | PyMem_Free(s) |
… |
… |
cdef class RealQuadDoubleField_class(Fie |
331 | 333 | """ |
332 | 334 | cdef qd z |
333 | 335 | cdef char *s |
| 336 | cdef unsigned int cw |
| 337 | fpu_fix_start(&cw) |
334 | 338 | s = <char*>PyMem_Malloc(63+8) # See docs for write() |
335 | 339 | _sig_on |
336 | 340 | z._log2.write(s,63,0,0) |
337 | 341 | _sig_off |
338 | 342 | t = str(s) |
339 | 343 | PyMem_Free(s) |
| 344 | fpu_fix_end(&cw) |
340 | 345 | return QuadDoubleElement(t) |
341 | 346 | |
342 | 347 | def e(self): |
… |
… |
cdef class RealQuadDoubleField_class(Fie |
349 | 354 | """ |
350 | 355 | cdef qd z |
351 | 356 | cdef char *s |
352 | | |
| 357 | cdef unsigned int cw |
| 358 | fpu_fix_start(&cw) |
353 | 359 | s = <char*>PyMem_Malloc(63+8) # See docs for write() |
354 | 360 | _sig_on |
355 | 361 | z._e.write(s,63,0,0) |
… |
… |
cdef class RealQuadDoubleField_class(Fie |
357 | 363 | t = str(s) |
358 | 364 | |
359 | 365 | PyMem_Free(s) |
| 366 | fpu_fix_end(&cw) |
360 | 367 | return QuadDoubleElement(t) |
361 | 368 | |
362 | 369 | def NaN(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
405 | 412 | cdef _new(self): |
406 | 413 | cdef QuadDoubleElement q |
407 | 414 | q = PY_NEW(QuadDoubleElement) |
408 | | fpu_fix_start(self.cw) |
409 | 415 | q.initptr = new_qd_real() |
410 | 416 | return q |
411 | 417 | |
412 | 418 | cdef _new_c(self, qd a): |
413 | 419 | cdef QuadDoubleElement q |
414 | 420 | q = PY_NEW(QuadDoubleElement) |
415 | | fpu_fix_start(self.cw) |
416 | 421 | q.initptr = qd_from_qd(a.x[0],a.x[1],a.x[2],a.x[3]) |
417 | 422 | return q |
418 | 423 | |
419 | 424 | def __dealloc__(self): |
420 | | fpu_fix_end(self.cw) |
| 425 | cdef unsigned int cw |
| 426 | fpu_fix_start(&cw) |
421 | 427 | delete(self.initptr) |
| 428 | fpu_fix_end(&cw) |
| 429 | pass |
422 | 430 | |
423 | 431 | def __new__(self, x=None): |
424 | 432 | # explicit cast required for C++ |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
456 | 464 | sage: RQDF(RR('1091.34342')) |
457 | 465 | 1091.343420000000000000000000000000000000000000000000000000000000 |
458 | 466 | """ |
459 | | fpu_fix_start(self.cw) |
460 | 467 | self._set(x) |
461 | | |
| 468 | |
462 | 469 | cdef _set(self, x): |
| 470 | cdef unsigned int cw |
| 471 | fpu_fix_start(&cw) |
463 | 472 | cdef qd *n,*d |
464 | 473 | |
465 | 474 | if PY_TYPE_CHECK(x, RealNumber): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
497 | 506 | _sig_off |
498 | 507 | |
499 | 508 | else: |
| 509 | fpu_fix_end(&cw) |
500 | 510 | raise TypeError, "Cannot coerce %s (parent %s) into a quad double" % (x, x.parent()) |
| 511 | fpu_fix_end(&cw) |
501 | 512 | |
502 | 513 | def get_doubles(self): |
503 | 514 | """ |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
648 | 659 | if x < 0: return "-inf" |
649 | 660 | return "inf" |
650 | 661 | if self.is_NaN(): return "NaN" |
651 | | |
652 | | if 0.0 == x: return self.__str_no_scientific() |
653 | | if 1e-12 < x and x < 1e12: |
654 | | return self.__str_no_scientific() |
655 | | if -1e-12 > x and x > -1e12: |
656 | | return self.__str_no_scientific() |
657 | | return self.__str_scientific() |
| 662 | cdef unsigned int cw |
| 663 | fpu_fix_start(&cw) |
| 664 | if 0.0 == x: |
| 665 | result = self.__str_no_scientific() |
| 666 | elif 1e-12 < x and x < 1e12: |
| 667 | result = self.__str_no_scientific() |
| 668 | elif -1e-12 > x and x > -1e12: |
| 669 | result = self.__str_no_scientific() |
| 670 | else: |
| 671 | result = self.__str_scientific() |
| 672 | fpu_fix_end(&cw) |
| 673 | return result |
658 | 674 | |
659 | 675 | def parent(self): |
660 | 676 | """ |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
687 | 703 | |
688 | 704 | """ |
689 | 705 | if 0 == self: return Integer("0") |
690 | | |
| 706 | cdef unsigned int cw |
| 707 | fpu_fix_start(&cw) |
691 | 708 | s = self.__str_no_scientific() |
692 | 709 | num = s.split('.')[0] |
693 | | return Integer(num) |
| 710 | result = Integer(num) |
| 711 | fpu_fix_end(&cw) |
| 712 | return result |
694 | 713 | |
695 | 714 | ######################## |
696 | 715 | # Basic Arithmetic |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
705 | 724 | 3.000000000000000000000000000000000000000000000000000000000000000 |
706 | 725 | """ |
707 | 726 | cdef QuadDoubleElement res |
708 | | res = self._new() |
| 727 | cdef unsigned int cw |
| 728 | fpu_fix_start(&cw) |
| 729 | res = self._new() |
709 | 730 | _sig_on |
710 | 731 | c_qd_npwr(self.initptr.x,-1,res.initptr.x) |
| 732 | fpu_fix_end(&cw) |
711 | 733 | _sig_off |
712 | 734 | return res |
713 | 735 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
719 | 741 | sage: RQDF(1/3) + RQDF(1) |
720 | 742 | 1.333333333333333333333333333333333333333333333333333333333333333 |
721 | 743 | """ |
722 | | |
723 | | cdef QuadDoubleElement res |
| 744 | cdef QuadDoubleElement res |
| 745 | cdef unsigned int cw |
| 746 | fpu_fix_start(&cw) |
724 | 747 | res = self._new() |
725 | 748 | c_qd_add(self.initptr.x,(<QuadDoubleElement>right).initptr.x,res.initptr.x) |
| 749 | fpu_fix_end(&cw) |
726 | 750 | return res |
727 | 751 | |
728 | 752 | cdef ModuleElement _sub_c_impl(self, ModuleElement right): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
734 | 758 | -0.666666666666666666666666666666666666666666666666666666666666666 |
735 | 759 | """ |
736 | 760 | cdef QuadDoubleElement res |
| 761 | cdef unsigned int cw |
| 762 | fpu_fix_start(&cw) |
737 | 763 | res = self._new() |
738 | 764 | c_qd_sub(self.initptr.x,(<QuadDoubleElement>right).initptr.x,res.initptr.x) |
| 765 | fpu_fix_end(&cw) |
739 | 766 | return res |
740 | 767 | |
741 | 768 | cdef RingElement _mul_c_impl(self, RingElement right): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
747 | 774 | 13.00000000000000000000000000000000000000000000000000000000000000 |
748 | 775 | """ |
749 | 776 | cdef QuadDoubleElement res |
| 777 | cdef unsigned int cw |
| 778 | fpu_fix_start(&cw) |
750 | 779 | res = self._new() |
751 | 780 | c_qd_mul(self.initptr.x,(<QuadDoubleElement>right).initptr.x,res.initptr.x) |
| 781 | fpu_fix_end(&cw) |
752 | 782 | return res |
753 | 783 | |
754 | 784 | cdef RingElement _div_c_impl(self, RingElement right): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
760 | 790 | 0.00333333333333333333333333333333333333333333333333333333333333333 |
761 | 791 | """ |
762 | 792 | cdef QuadDoubleElement res |
| 793 | cdef unsigned int cw |
| 794 | fpu_fix_start(&cw) |
763 | 795 | res = self._new() |
764 | 796 | c_qd_div(self.initptr.x,(<QuadDoubleElement>right).initptr.x,res.initptr.x) |
| 797 | fpu_fix_end(&cw) |
765 | 798 | return res |
766 | 799 | |
767 | 800 | cdef ModuleElement _neg_c_impl(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
773 | 806 | -0.0560000000000000000000000000000000000000000000000000000000000000 |
774 | 807 | """ |
775 | 808 | cdef QuadDoubleElement res |
| 809 | cdef unsigned int cw |
| 810 | fpu_fix_start(&cw) # This might not be needed here. |
776 | 811 | res = self._new() |
777 | 812 | c_qd_neg(self.initptr.x,res.initptr.x) |
| 813 | fpu_fix_end(&cw) |
778 | 814 | return res |
779 | 815 | |
780 | 816 | def __abs__(self): |
781 | 817 | """ |
782 | | Negates a quad double number. |
| 818 | Returns the absolute value of a quad double number. |
783 | 819 | |
784 | 820 | EXAMPLES: |
785 | 821 | sage: abs(RQDF('-0.45')) |
786 | 822 | 0.450000000000000000000000000000000000000000000000000000000000000 |
787 | 823 | """ |
788 | 824 | cdef QuadDoubleElement res |
| 825 | cdef unsigned int cw |
| 826 | fpu_fix_start(&cw) |
789 | 827 | res = self._new() |
790 | 828 | c_qd_abs(self.initptr.x,res.initptr.x) |
| 829 | fpu_fix_end(&cw) |
791 | 830 | return res |
792 | 831 | |
793 | 832 | def __lshift__(self, n): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
838 | 877 | 1.000000000000000000000000000000000000000000000000000000000000000 |
839 | 878 | """ |
840 | 879 | cdef QuadDoubleElement res |
| 880 | cdef unsigned int cw |
| 881 | fpu_fix_start(&cw) |
841 | 882 | res = self._new() |
842 | 883 | if self.frac() < 0.5: |
843 | 884 | _sig_on |
844 | 885 | c_qd_floor(self.initptr.x,res.initptr.x) |
| 886 | fpu_fix_end(&cw) |
845 | 887 | _sig_off |
846 | 888 | return res |
847 | 889 | |
848 | 890 | _sig_on |
849 | 891 | c_qd_ceil(self.initptr.x,res.initptr.x) |
| 892 | fpu_fix_end(&cw) |
850 | 893 | _sig_off |
851 | 894 | return res |
852 | 895 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
864 | 907 | -3 |
865 | 908 | """ |
866 | 909 | cdef QuadDoubleElement res |
| 910 | cdef unsigned int cw |
| 911 | fpu_fix_start(&cw) |
867 | 912 | res = self._new() |
868 | 913 | c_qd_floor(self.initptr.x,res.initptr.x) |
| 914 | fpu_fix_end(&cw) |
869 | 915 | return res.integer_part() |
870 | 916 | |
871 | 917 | def ceil(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
883 | 929 | <type 'sage.rings.integer.Integer'> |
884 | 930 | """ |
885 | 931 | cdef QuadDoubleElement res |
| 932 | cdef unsigned int cw |
| 933 | fpu_fix_start(&cw) |
886 | 934 | res = self._new() |
887 | 935 | c_qd_ceil(self.initptr.x,res.initptr.x) |
| 936 | fpu_fix_end(&cw) |
888 | 937 | return res.integer_part() |
889 | 938 | |
890 | 939 | def ceiling(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
942 | 991 | -23.789999999999999 |
943 | 992 | """ |
944 | 993 | cdef double d |
| 994 | cdef unsigned int cw |
| 995 | fpu_fix_start(&cw) |
945 | 996 | d = qd_to_double(qd_deref(self.initptr)) |
| 997 | fpu_fix_end(&cw) |
946 | 998 | return d |
947 | 999 | |
948 | 1000 | def __int__(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
956 | 1008 | -23 |
957 | 1009 | """ |
958 | 1010 | cdef int i |
| 1011 | cdef unsigned int cw |
| 1012 | fpu_fix_start(&cw) |
959 | 1013 | i = qd_to_int(qd_deref(self.initptr)) |
| 1014 | fpu_fix_end(&cw) |
960 | 1015 | return i |
961 | 1016 | |
962 | 1017 | def __long__(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1210 | 1265 | NaN |
1211 | 1266 | """ |
1212 | 1267 | cdef QuadDoubleElement res |
| 1268 | cdef unsigned int cw |
| 1269 | fpu_fix_start(&cw) |
1213 | 1270 | res = self._new() |
1214 | 1271 | if self.initptr.x[0] > 0: |
1215 | 1272 | c_qd_sqrt(self.initptr.x, res.initptr.x) |
| 1273 | fpu_fix_end(&cw) |
1216 | 1274 | return res |
1217 | 1275 | else: |
1218 | 1276 | res = self._new_c(self.initptr._nan) |
| 1277 | fpu_fix_end(&cw) |
1219 | 1278 | return res |
1220 | 1279 | |
1221 | 1280 | def cube_root(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1234 | 1293 | def nth_root(self, int n): |
1235 | 1294 | """ |
1236 | 1295 | Returns the $n^{th}$ root of self. |
1237 | | Returns NaN if self is negative |
| 1296 | Returns NaN if self is negative and $n$ is even. |
1238 | 1297 | |
1239 | 1298 | EXAMPLES: |
1240 | 1299 | sage: r = RQDF(125.0); r.nth_root(3) |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1247 | 1306 | |
1248 | 1307 | cdef QuadDoubleElement res |
1249 | 1308 | cdef double neg[4] |
| 1309 | cdef unsigned int cw |
| 1310 | fpu_fix_start(&cw) |
1250 | 1311 | res = self._new() |
1251 | 1312 | _sig_on |
1252 | 1313 | if self.initptr.is_negative() and n % 2 == 1: |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1255 | 1316 | c_qd_neg(res.initptr.x, res.initptr.x) |
1256 | 1317 | else: |
1257 | 1318 | c_qd_nroot(self.initptr.x, n, res.initptr.x) |
| 1319 | fpu_fix_end(&cw) |
1258 | 1320 | _sig_off |
1259 | 1321 | return res |
1260 | 1322 | |
1261 | 1323 | def __pow(self, n, modulus): |
1262 | 1324 | cdef QuadDoubleElement res, n2 |
| 1325 | cdef unsigned int cw |
| 1326 | fpu_fix_start(&cw) |
1263 | 1327 | res = self._new() |
1264 | 1328 | _sig_on |
1265 | 1329 | c_qd_npwr(self.initptr.x, n, res.initptr.x) |
| 1330 | fpu_fix_end(&cw) |
1266 | 1331 | _sig_off |
1267 | 1332 | return res |
1268 | 1333 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1279 | 1344 | """ |
1280 | 1345 | if not isinstance(n,(Integer, int)): |
1281 | 1346 | res = n * self.log() |
1282 | | return res.exp() |
1283 | | return self.__pow(n,d) |
| 1347 | res = res.exp() |
| 1348 | else: |
| 1349 | res = self.__pow(n,d) |
| 1350 | return res |
1284 | 1351 | |
1285 | 1352 | def log(self): |
1286 | 1353 | """ |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1297 | 1364 | NaN |
1298 | 1365 | """ |
1299 | 1366 | cdef QuadDoubleElement res |
| 1367 | cdef unsigned int cw |
| 1368 | fpu_fix_start(&cw) |
1300 | 1369 | if self.initptr.x[0] < 0.0: |
1301 | 1370 | res = self._new_c(self.initptr._nan) |
1302 | | return res |
1303 | 1371 | elif self.initptr.x[0] == 0.0: |
1304 | 1372 | res = self._new() |
1305 | 1373 | res.initptr = qd_from_double(-INFINITY) |
1306 | | return res |
1307 | | |
1308 | | res = self._new() |
1309 | | _sig_on |
1310 | | c_qd_log(self.initptr.x,res.initptr.x) |
1311 | | _sig_off |
| 1374 | else: |
| 1375 | res = self._new() |
| 1376 | _sig_on |
| 1377 | c_qd_log(self.initptr.x,res.initptr.x) |
| 1378 | _sig_off |
| 1379 | fpu_fix_end(&cw) |
| 1380 | |
1312 | 1381 | return res |
1313 | 1382 | |
1314 | 1383 | def log10(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1327 | 1396 | |
1328 | 1397 | """ |
1329 | 1398 | cdef QuadDoubleElement res |
| 1399 | cdef unsigned int cw |
| 1400 | fpu_fix_start(&cw) |
1330 | 1401 | if self.initptr.x[0] < 0.0: |
1331 | 1402 | res = self._new_c(self.initptr._nan) |
1332 | | return res |
1333 | 1403 | elif self.initptr.x[0] == 0.0: |
1334 | 1404 | res = self._new() |
1335 | 1405 | res.initptr = qd_from_double(-INFINITY) |
1336 | | return res |
1337 | | |
1338 | | res = self._new() |
1339 | | _sig_on |
1340 | | c_qd_log10(self.initptr.x,res.initptr.x) |
1341 | | _sig_off |
| 1406 | else: |
| 1407 | res = self._new() |
| 1408 | _sig_on |
| 1409 | c_qd_log10(self.initptr.x,res.initptr.x) |
| 1410 | _sig_off |
| 1411 | fpu_fix_end(&cw) |
| 1412 | |
1342 | 1413 | return res |
1343 | 1414 | |
1344 | 1415 | def exp(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1355 | 1426 | True |
1356 | 1427 | """ |
1357 | 1428 | cdef QuadDoubleElement res |
| 1429 | cdef unsigned int cw |
| 1430 | fpu_fix_start(&cw) |
1358 | 1431 | res = self._new() |
1359 | 1432 | _sig_on |
1360 | 1433 | c_qd_exp(self.initptr.x,res.initptr.x) |
1361 | 1434 | _sig_off |
| 1435 | fpu_fix_end(&cw) |
1362 | 1436 | return res |
1363 | 1437 | |
1364 | 1438 | def cos(self): |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1373 | 1447 | 1.000000000000000000000000000000000000000000000000000000000000000 |
1374 | 1448 | """ |
1375 | 1449 | cdef QuadDoubleElement res |
| 1450 | cdef unsigned int cw |
| 1451 | fpu_fix_start(&cw) |
1376 | 1452 | res = self._new() |
1377 | 1453 | _sig_on |
1378 | 1454 | c_qd_cos(self.initptr.x,res.initptr.x) |
| 1455 | fpu_fix_end(&cw) |
1379 | 1456 | _sig_off |
1380 | 1457 | return res |
1381 | 1458 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1388 | 1465 | 2.29792739447387129688852462923399363132147373173602668183970676e-63 |
1389 | 1466 | """ |
1390 | 1467 | cdef QuadDoubleElement res |
| 1468 | cdef unsigned int cw |
| 1469 | fpu_fix_start(&cw) |
1391 | 1470 | res = self._new() |
1392 | 1471 | _sig_on |
1393 | 1472 | c_qd_sin(self.initptr.x,res.initptr.x) |
| 1473 | fpu_fix_end(&cw) |
1394 | 1474 | _sig_off |
1395 | 1475 | return res |
1396 | 1476 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1407 | 1487 | 0.577350269189625764509148780501957455647601751270126876018602326 |
1408 | 1488 | """ |
1409 | 1489 | cdef QuadDoubleElement res |
| 1490 | cdef unsigned int cw |
| 1491 | fpu_fix_start(&cw) |
1410 | 1492 | res = self._new() |
1411 | 1493 | _sig_on |
1412 | 1494 | c_qd_tan(self.initptr.x,res.initptr.x) |
| 1495 | fpu_fix_end(&cw) |
1413 | 1496 | _sig_off |
1414 | 1497 | return res |
1415 | 1498 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1437 | 1520 | 1.047197551196597746154214461093167628065723133125035273658314863 |
1438 | 1521 | """ |
1439 | 1522 | cdef QuadDoubleElement res |
| 1523 | cdef unsigned int cw |
| 1524 | fpu_fix_start(&cw) |
1440 | 1525 | res = self._new() |
1441 | 1526 | _sig_on |
1442 | 1527 | c_qd_acos(self.initptr.x,res.initptr.x) |
| 1528 | fpu_fix_end(&cw) |
1443 | 1529 | _sig_off |
1444 | 1530 | return res |
1445 | 1531 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1456 | 1542 | 1.047197551196597746154214461093167628065723133125035273658314863 |
1457 | 1543 | """ |
1458 | 1544 | cdef QuadDoubleElement res |
| 1545 | cdef unsigned int cw |
| 1546 | fpu_fix_start(&cw) |
1459 | 1547 | res = self._new() |
1460 | 1548 | _sig_on |
1461 | 1549 | c_qd_asin(self.initptr.x,res.initptr.x) |
| 1550 | fpu_fix_end(&cw) |
1462 | 1551 | _sig_off |
1463 | 1552 | return res |
1464 | 1553 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1475 | 1564 | 1.047197551196597746154214461093167628065723133125035273658314863 |
1476 | 1565 | """ |
1477 | 1566 | cdef QuadDoubleElement res |
| 1567 | cdef unsigned int cw |
| 1568 | fpu_fix_start(&cw) |
1478 | 1569 | res = self._new() |
1479 | 1570 | _sig_on |
1480 | 1571 | c_qd_atan(self.initptr.x,res.initptr.x) |
| 1572 | fpu_fix_end(&cw) |
1481 | 1573 | _sig_off |
1482 | 1574 | return res |
1483 | 1575 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1491 | 1583 | 1.034465640095510565271865251179886560959831568117717546138668562 |
1492 | 1584 | """ |
1493 | 1585 | cdef QuadDoubleElement res |
| 1586 | cdef unsigned int cw |
| 1587 | fpu_fix_start(&cw) |
1494 | 1588 | res = self._new() |
1495 | 1589 | _sig_on |
1496 | 1590 | c_qd_cosh(self.initptr.x,res.initptr.x) |
| 1591 | fpu_fix_end(&cw) |
1497 | 1592 | _sig_off |
1498 | 1593 | return res |
1499 | 1594 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1507 | 1602 | -0.264800227602270757698096543949405541727737186661923151601337992 |
1508 | 1603 | """ |
1509 | 1604 | cdef QuadDoubleElement res |
| 1605 | cdef unsigned int cw |
| 1606 | fpu_fix_start(&cw) |
1510 | 1607 | res = self._new() |
1511 | 1608 | _sig_on |
1512 | 1609 | c_qd_sinh(self.initptr.x,res.initptr.x) |
| 1610 | fpu_fix_end(&cw) |
1513 | 1611 | _sig_off |
1514 | 1612 | return res |
1515 | 1613 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1523 | 1621 | 0.255977789245684539459617840766661476446446454939881314446181622 |
1524 | 1622 | """ |
1525 | 1623 | cdef QuadDoubleElement res |
| 1624 | cdef unsigned int cw |
| 1625 | fpu_fix_start(&cw) |
1526 | 1626 | res = self._new() |
1527 | 1627 | _sig_on |
1528 | 1628 | c_qd_tanh(self.initptr.x,res.initptr.x) |
| 1629 | fpu_fix_end(&cw) |
1529 | 1630 | _sig_off |
1530 | 1631 | return res |
1531 | 1632 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1543 | 1644 | 1.570796326794896619231321691639751442098584699687552910487472295 |
1544 | 1645 | """ |
1545 | 1646 | cdef QuadDoubleElement res |
| 1647 | cdef unsigned int cw |
| 1648 | fpu_fix_start(&cw) |
1546 | 1649 | res = self._new() |
1547 | 1650 | _sig_on |
1548 | 1651 | c_qd_acosh(self.initptr.x,res.initptr.x) |
| 1652 | fpu_fix_end(&cw) |
1549 | 1653 | _sig_off |
1550 | 1654 | return res |
1551 | 1655 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1562 | 1666 | 1.570796326794896619231321691639751442098584699687552910487472295 |
1563 | 1667 | """ |
1564 | 1668 | cdef QuadDoubleElement res |
| 1669 | cdef unsigned int cw |
| 1670 | fpu_fix_start(&cw) |
1565 | 1671 | res = self._new() |
1566 | 1672 | _sig_on |
1567 | 1673 | c_qd_asinh(self.initptr.x,res.initptr.x) |
| 1674 | fpu_fix_end(&cw) |
1568 | 1675 | _sig_off |
1569 | 1676 | return res |
1570 | 1677 | |
… |
… |
cdef class QuadDoubleElement(FieldElemen |
1581 | 1688 | 1.570796326794896619231321691639751442098584699687552910487472295 |
1582 | 1689 | """ |
1583 | 1690 | cdef QuadDoubleElement res |
| 1691 | cdef unsigned int cw |
| 1692 | fpu_fix_start(&cw) |
1584 | 1693 | res = self._new() |
1585 | 1694 | _sig_on |
1586 | 1695 | c_qd_atanh(self.initptr.x,res.initptr.x) |
| 1696 | fpu_fix_end(&cw) |
1587 | 1697 | _sig_off |
1588 | 1698 | return res |
1589 | 1699 | |