crmf 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +12 -0
  3. data/crmf.gemspec +105 -3
  4. data/ext/crlibm-1.0beta5/AUTHORS +2 -0
  5. data/ext/crlibm-1.0beta5/CMakeLists.txt +154 -0
  6. data/ext/crlibm-1.0beta5/COPYING +340 -0
  7. data/ext/crlibm-1.0beta5/COPYING.LIB +504 -0
  8. data/ext/crlibm-1.0beta5/ChangeLog +125 -0
  9. data/ext/crlibm-1.0beta5/Makefile.am +134 -0
  10. data/ext/crlibm-1.0beta5/NEWS +0 -0
  11. data/ext/crlibm-1.0beta5/README +31 -0
  12. data/ext/crlibm-1.0beta5/README.DEV +23 -0
  13. data/ext/crlibm-1.0beta5/README.md +5 -0
  14. data/ext/crlibm-1.0beta5/TODO +66 -0
  15. data/ext/crlibm-1.0beta5/VERSION +1 -0
  16. data/ext/crlibm-1.0beta5/acos-td.c +1195 -0
  17. data/ext/crlibm-1.0beta5/acos-td.h +629 -0
  18. data/ext/crlibm-1.0beta5/asin-td.c +1297 -0
  19. data/ext/crlibm-1.0beta5/asin-td.h +620 -0
  20. data/ext/crlibm-1.0beta5/asincos.c +4488 -0
  21. data/ext/crlibm-1.0beta5/asincos.h +575 -0
  22. data/ext/crlibm-1.0beta5/atan-itanium.c +846 -0
  23. data/ext/crlibm-1.0beta5/atan-pentium.c +280 -0
  24. data/ext/crlibm-1.0beta5/atan-pentium.h +343 -0
  25. data/ext/crlibm-1.0beta5/atan_accurate.c +341 -0
  26. data/ext/crlibm-1.0beta5/atan_accurate.h +198 -0
  27. data/ext/crlibm-1.0beta5/atan_fast.c +506 -0
  28. data/ext/crlibm-1.0beta5/atan_fast.h +680 -0
  29. data/ext/crlibm-1.0beta5/configure.ac +419 -0
  30. data/ext/crlibm-1.0beta5/crlibm.h +204 -0
  31. data/ext/crlibm-1.0beta5/crlibm.spec +42 -0
  32. data/ext/crlibm-1.0beta5/crlibm_private.c +397 -0
  33. data/ext/crlibm-1.0beta5/crlibm_private.h +1048 -0
  34. data/ext/crlibm-1.0beta5/csh_fast.c +721 -0
  35. data/ext/crlibm-1.0beta5/csh_fast.h +771 -0
  36. data/ext/crlibm-1.0beta5/double-extended.h +496 -0
  37. data/ext/crlibm-1.0beta5/exp-itanium.c +723 -0
  38. data/ext/crlibm-1.0beta5/exp-td-standalone.c +87 -0
  39. data/ext/crlibm-1.0beta5/exp-td.c +1363 -0
  40. data/ext/crlibm-1.0beta5/exp-td.h +685 -0
  41. data/ext/crlibm-1.0beta5/exp_build_coeffs/exp_fast_table.c +125 -0
  42. data/ext/crlibm-1.0beta5/expm1-standalone.c +119 -0
  43. data/ext/crlibm-1.0beta5/expm1.c +2515 -0
  44. data/ext/crlibm-1.0beta5/expm1.h +715 -0
  45. data/ext/crlibm-1.0beta5/interval.h +238 -0
  46. data/ext/crlibm-1.0beta5/log-de.c +480 -0
  47. data/ext/crlibm-1.0beta5/log-de.h +747 -0
  48. data/ext/crlibm-1.0beta5/log-de2.c +280 -0
  49. data/ext/crlibm-1.0beta5/log-de2.h +2352 -0
  50. data/ext/crlibm-1.0beta5/log-td.c +1158 -0
  51. data/ext/crlibm-1.0beta5/log-td.h +819 -0
  52. data/ext/crlibm-1.0beta5/log.c +2244 -0
  53. data/ext/crlibm-1.0beta5/log.h +1592 -0
  54. data/ext/crlibm-1.0beta5/log10-td.c +906 -0
  55. data/ext/crlibm-1.0beta5/log10-td.h +823 -0
  56. data/ext/crlibm-1.0beta5/log1p.c +1295 -0
  57. data/ext/crlibm-1.0beta5/log2-td.c +1521 -0
  58. data/ext/crlibm-1.0beta5/log2-td.h +821 -0
  59. data/ext/crlibm-1.0beta5/log2_accurate.c +330 -0
  60. data/ext/crlibm-1.0beta5/log2_accurate.h +261 -0
  61. data/ext/crlibm-1.0beta5/log_accurate.c +133 -0
  62. data/ext/crlibm-1.0beta5/log_accurate.h +261 -0
  63. data/ext/crlibm-1.0beta5/log_fast.c +360 -0
  64. data/ext/crlibm-1.0beta5/log_fast.h +440 -0
  65. data/ext/crlibm-1.0beta5/pow.c +1396 -0
  66. data/ext/crlibm-1.0beta5/pow.h +3101 -0
  67. data/ext/crlibm-1.0beta5/prepare +20 -0
  68. data/ext/crlibm-1.0beta5/rem_pio2_accurate.c +219 -0
  69. data/ext/crlibm-1.0beta5/rem_pio2_accurate.h +53 -0
  70. data/ext/crlibm-1.0beta5/scs_lib/AUTHORS +3 -0
  71. data/ext/crlibm-1.0beta5/scs_lib/COPYING +504 -0
  72. data/ext/crlibm-1.0beta5/scs_lib/ChangeLog +16 -0
  73. data/ext/crlibm-1.0beta5/scs_lib/Doxyfile.dev +939 -0
  74. data/ext/crlibm-1.0beta5/scs_lib/Doxyfile.user +939 -0
  75. data/ext/crlibm-1.0beta5/scs_lib/INSTALL +215 -0
  76. data/ext/crlibm-1.0beta5/scs_lib/Makefile.am +17 -0
  77. data/ext/crlibm-1.0beta5/scs_lib/NEWS +0 -0
  78. data/ext/crlibm-1.0beta5/scs_lib/README +9 -0
  79. data/ext/crlibm-1.0beta5/scs_lib/README.DEV +38 -0
  80. data/ext/crlibm-1.0beta5/scs_lib/TODO +4 -0
  81. data/ext/crlibm-1.0beta5/scs_lib/VERSION +1 -0
  82. data/ext/crlibm-1.0beta5/scs_lib/addition_scs.c +623 -0
  83. data/ext/crlibm-1.0beta5/scs_lib/division_scs.c +110 -0
  84. data/ext/crlibm-1.0beta5/scs_lib/double2scs.c +174 -0
  85. data/ext/crlibm-1.0beta5/scs_lib/main.dox +104 -0
  86. data/ext/crlibm-1.0beta5/scs_lib/multiplication_scs.c +339 -0
  87. data/ext/crlibm-1.0beta5/scs_lib/poly_fct.c +112 -0
  88. data/ext/crlibm-1.0beta5/scs_lib/print_scs.c +73 -0
  89. data/ext/crlibm-1.0beta5/scs_lib/rand_scs.c +63 -0
  90. data/ext/crlibm-1.0beta5/scs_lib/scs.h +353 -0
  91. data/ext/crlibm-1.0beta5/scs_lib/scs2double.c +411 -0
  92. data/ext/crlibm-1.0beta5/scs_lib/scs2mpf.c +58 -0
  93. data/ext/crlibm-1.0beta5/scs_lib/scs2mpfr.c +61 -0
  94. data/ext/crlibm-1.0beta5/scs_lib/scs_private.c +23 -0
  95. data/ext/crlibm-1.0beta5/scs_lib/scs_private.h +133 -0
  96. data/ext/crlibm-1.0beta5/scs_lib/wrapper_scs.h +486 -0
  97. data/ext/crlibm-1.0beta5/scs_lib/zero_scs.c +52 -0
  98. data/ext/crlibm-1.0beta5/trigo_accurate.c +501 -0
  99. data/ext/crlibm-1.0beta5/trigo_accurate.h +331 -0
  100. data/ext/crlibm-1.0beta5/trigo_fast.c +1243 -0
  101. data/ext/crlibm-1.0beta5/trigo_fast.h +639 -0
  102. data/ext/crlibm-1.0beta5/trigpi.c +1169 -0
  103. data/ext/crlibm-1.0beta5/trigpi.h +556 -0
  104. data/ext/crlibm-1.0beta5/triple-double.c +57 -0
  105. data/ext/crlibm-1.0beta5/triple-double.h +1380 -0
  106. data/ext/crmf/crmf.c +117 -20
  107. data/ext/crmf/extconf.rb +12 -8
  108. data/lib/crmf/version.rb +1 -1
  109. data/tests/perf.rb +100 -219
  110. metadata +108 -10
  111. data/ext/crlibm-1.0beta4.tar.gz +0 -0
@@ -0,0 +1,501 @@
1
+ /*
2
+ * Correctly rounded trigonometric functions
3
+ *
4
+ * Author : Catherine Daramy, David Defour, Florent de Dinechin
5
+ *
6
+ * This file is part of the crlibm library developed by the Arenaire
7
+ * project at Ecole Normale Superieure de Lyon
8
+ *
9
+ * This program is free software; you can redistribute it and/or modify
10
+ * it under the terms of the GNU Lesser General Public License as published by
11
+ * the Free Software Foundation; either version 2 of the License, or
12
+ * (at your option) any later version.
13
+ *
14
+ * This program is distributed in the hope that it will be useful,
15
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ * GNU General Public License for more details.
18
+ *
19
+ * You should have received a copy of the GNU Lesser General Public License
20
+ * along with this program; if not, write to the Free Software
21
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
+ */
23
+ #include <stdio.h>
24
+ #include <stdlib.h>
25
+ #include "trigo_accurate.h"
26
+
27
+
28
+ /*
29
+ *
30
+ * 1) Range reduction if needed ... x in [-Pi/4, +Pi/4]
31
+ *
32
+ * 2) call cosine, sine or tan polynomial
33
+ *
34
+ * Polynomials are vastly too accurate.
35
+ */
36
+
37
+
38
+
39
+ extern int rem_pio2_scs(scs_ptr, scs_ptr);
40
+
41
+
42
+ /* Polynomial evaluation of sin(x) over [-Pi/4, +Pi/4]
43
+ Approximation error lower than 2^(-133) */
44
+
45
+ static void scs_sin(scs_ptr x){
46
+ scs_t res_scs;
47
+ scs_t x2;
48
+ int i;
49
+
50
+ scs_square(x2, x);
51
+ scs_mul(res_scs, sin_scs_poly_ptr[0], x2);
52
+
53
+ for(i=1; i<(DEGREE_SIN_SCS-1)/2; i++){ /* Last coeff is one, not read from the file*/
54
+ scs_add(res_scs, sin_scs_poly_ptr[i], res_scs);
55
+ scs_mul(res_scs, res_scs, x2);
56
+ }
57
+ scs_mul(res_scs, res_scs, x);
58
+ scs_add(x, x, res_scs);
59
+
60
+ return;
61
+ }
62
+
63
+
64
+ /* Polynomial evaluation of cos(x) over [-Pi/4, +Pi/4]
65
+ Approximation error lower than 2^(-128) */
66
+
67
+ static void scs_cos(scs_ptr x){
68
+ scs_t res_scs;
69
+ scs_t x2;
70
+ int i;
71
+
72
+ scs_square(x2, x);
73
+ scs_mul(res_scs, cos_scs_poly_ptr[0], x2);
74
+ for(i=1; i<DEGREE_COS_SCS/2; i++){
75
+ scs_add(res_scs, cos_scs_poly_ptr[i], res_scs);
76
+ scs_mul(res_scs, res_scs, x2);
77
+ }
78
+ /* The last coefficient is exactly one and is not read from the file */
79
+ scs_add(x, res_scs, SCS_ONE);
80
+
81
+ return ;
82
+ }
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+ double scs_sin_rn(double x){
92
+ scs_t sc1, sc2;
93
+ double resd;
94
+ int N;
95
+
96
+
97
+ #if EVAL_PERF
98
+ crlibm_second_step_taken++;
99
+ #endif
100
+
101
+ scs_set_d(sc1, x);
102
+ N = rem_pio2_scs(sc2, sc1);
103
+ N = N & 0x0000003; /* extract the 2 last bits of N */
104
+ switch (N){
105
+ case 0:
106
+ scs_sin(sc2);
107
+ scs_get_d(&resd, sc2);
108
+ return resd;
109
+ case 1:
110
+ scs_cos(sc2);
111
+ scs_get_d(&resd, sc2);
112
+ return resd;
113
+ case 2:
114
+ scs_sin(sc2);
115
+ scs_get_d(&resd, sc2);
116
+ return -resd;
117
+ case 3:
118
+ scs_cos(sc2);
119
+ scs_get_d(&resd, sc2);
120
+ return -resd;
121
+ default:
122
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
123
+ return 0.0;
124
+ }
125
+ }
126
+
127
+
128
+
129
+
130
+ double scs_sin_rd(double x){
131
+ scs_t sc1, sc2;
132
+ double resd;
133
+ int N;
134
+
135
+ #if EVAL_PERF
136
+ crlibm_second_step_taken++;
137
+ #endif
138
+
139
+ scs_set_d(sc1, x);
140
+ N = rem_pio2_scs(sc2, sc1);
141
+ N = N & 0x0000003; /* extract the 2 last bits of N */
142
+ switch (N){
143
+ case 0:
144
+ scs_sin(sc2);
145
+ scs_get_d_minf(&resd, sc2);
146
+ return resd;
147
+ case 1:
148
+ scs_cos(sc2);
149
+ scs_get_d_minf(&resd, sc2);
150
+ return resd;
151
+ case 2:
152
+ scs_sin(sc2);
153
+ scs_get_d_pinf(&resd, sc2);
154
+ return -resd;
155
+ case 3:
156
+ scs_cos(sc2);
157
+ scs_get_d_pinf(&resd, sc2);
158
+ return -resd;
159
+ default:
160
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
161
+ exit(1);
162
+ }
163
+ return resd;
164
+ }
165
+
166
+
167
+
168
+
169
+ double scs_sin_ru(double x){
170
+ scs_t sc1, sc2;
171
+ double resd;
172
+ int N;
173
+
174
+ #if EVAL_PERF
175
+ crlibm_second_step_taken++;
176
+ #endif
177
+
178
+ scs_set_d(sc1, x);
179
+ N = rem_pio2_scs(sc2, sc1);
180
+ N = N & 0x0000003; /* extract the 2 last bits of N */
181
+ switch (N){
182
+ case 0:
183
+ scs_sin(sc2);
184
+ scs_get_d_pinf(&resd, sc2);
185
+ return resd;
186
+ case 1:
187
+ scs_cos(sc2);
188
+ scs_get_d_pinf(&resd, sc2);
189
+ return resd;
190
+ case 2:
191
+ scs_sin(sc2);
192
+ scs_get_d_minf(&resd, sc2);
193
+ return -resd;
194
+ case 3:
195
+ scs_cos(sc2);
196
+ scs_get_d_minf(&resd, sc2);
197
+ return -resd;
198
+ default:
199
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
200
+ exit(1);
201
+ }
202
+ return resd;
203
+ }
204
+
205
+
206
+
207
+
208
+ double scs_sin_rz(double x){
209
+ scs_t sc1, sc2;
210
+ double resd;
211
+ int N;
212
+
213
+ #if EVAL_PERF
214
+ crlibm_second_step_taken++;
215
+ #endif
216
+
217
+ scs_set_d(sc1, x);
218
+ N = rem_pio2_scs(sc2, sc1);
219
+ N = N & 0x0000003; /* extract the 2 last bits of N */
220
+ switch (N){
221
+ case 0:
222
+ scs_sin(sc2);
223
+ scs_get_d_zero(&resd, sc2);
224
+ return resd;
225
+ case 1:
226
+ scs_cos(sc2);
227
+ scs_get_d_zero(&resd, sc2);
228
+ return resd;
229
+ case 2:
230
+ scs_sin(sc2);
231
+ scs_get_d_zero(&resd, sc2);
232
+ return -resd;
233
+ case 3:
234
+ scs_cos(sc2);
235
+ scs_get_d_zero(&resd, sc2);
236
+ return -resd;
237
+ default:
238
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_scs_sin \n", N);
239
+ exit(1);
240
+ }
241
+ return resd;
242
+ }
243
+
244
+
245
+
246
+
247
+
248
+
249
+
250
+ double scs_cos_rn(double x){
251
+ scs_t sc1, sc2;
252
+ double resd;
253
+ int N;
254
+
255
+ #if EVAL_PERF
256
+ crlibm_second_step_taken++;
257
+ #endif
258
+
259
+ scs_set_d(sc1, x);
260
+ N = rem_pio2_scs(sc2, sc1);
261
+ N = N & 0x0000003; /* extract the 2 last bits of N */
262
+ switch (N){
263
+ case 0:
264
+ scs_cos(sc2);
265
+ scs_get_d(&resd, sc2);
266
+ return resd;
267
+ case 1:
268
+ scs_sin(sc2);
269
+ scs_get_d(&resd, sc2);
270
+ return -resd;
271
+ case 2:
272
+ scs_cos(sc2);
273
+ scs_get_d(&resd, sc2);
274
+ return -resd;
275
+ case 3:
276
+ scs_sin(sc2);
277
+ scs_get_d(&resd, sc2);
278
+ return resd;
279
+ default:
280
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
281
+ return 0.0;
282
+ }
283
+
284
+ }
285
+
286
+
287
+ double scs_cos_rd(double x){
288
+ scs_t sc1, sc2;
289
+ double resd;
290
+ int N;
291
+
292
+ #if EVAL_PERF
293
+ crlibm_second_step_taken++;
294
+ #endif
295
+
296
+ scs_set_d(sc1, x);
297
+ N = rem_pio2_scs(sc2, sc1);
298
+ N = N & 0x0000003; /* extract the 2 last bits of N */
299
+ switch (N){
300
+ case 0:
301
+ scs_cos(sc2);
302
+ scs_get_d_minf(&resd, sc2);
303
+ return resd;
304
+ case 1:
305
+ scs_sin(sc2);
306
+ scs_get_d_pinf(&resd, sc2);
307
+ return -resd;
308
+ case 2:
309
+ scs_cos(sc2);
310
+ scs_get_d_pinf(&resd, sc2);
311
+ return -resd;
312
+ case 3:
313
+ scs_sin(sc2);
314
+ scs_get_d_minf(&resd, sc2);
315
+ return resd;
316
+ default:
317
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
318
+ exit(1);
319
+ }
320
+ return resd;
321
+ }
322
+
323
+
324
+ double scs_cos_ru(double x){
325
+ scs_t sc1, sc2;
326
+ double resd;
327
+ int N;
328
+
329
+ #if EVAL_PERF
330
+ crlibm_second_step_taken++;
331
+ #endif
332
+
333
+ scs_set_d(sc1, x);
334
+ N = rem_pio2_scs(sc2, sc1);
335
+ N = N & 0x0000003; /* extract the 2 last bits of N */
336
+ switch (N){
337
+ case 0:
338
+ scs_cos(sc2);
339
+ scs_get_d_pinf(&resd, sc2);
340
+ return resd;
341
+ case 1:
342
+ scs_sin(sc2);
343
+ scs_get_d_minf(&resd, sc2);
344
+ return -resd;
345
+ case 2:
346
+ scs_cos(sc2);
347
+ scs_get_d_minf(&resd, sc2);
348
+ return -resd;
349
+ case 3:
350
+ scs_sin(sc2);
351
+ scs_get_d_pinf(&resd, sc2);
352
+ return resd;
353
+ default:
354
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
355
+ exit(1);
356
+ }
357
+ return resd;
358
+ }
359
+
360
+
361
+
362
+ double scs_cos_rz(double x){
363
+ scs_t sc1, sc2;
364
+ double resd;
365
+ int N;
366
+
367
+ #if EVAL_PERF
368
+ crlibm_second_step_taken++;
369
+ #endif
370
+
371
+ scs_set_d(sc1, x);
372
+ N = rem_pio2_scs(sc2, sc1);
373
+ N = N & 0x0000003; /* extract the 2 last bits of N */
374
+ switch (N){
375
+ case 0:
376
+ scs_cos(sc2);
377
+ scs_get_d_zero(&resd, sc2);
378
+ return resd;
379
+ case 1:
380
+ scs_sin(sc2);
381
+ scs_get_d_zero(&resd, sc2);
382
+ return -resd;
383
+ case 2:
384
+ scs_cos(sc2);
385
+ scs_get_d_zero(&resd, sc2);
386
+ return -resd;
387
+ case 3:
388
+ scs_sin(sc2);
389
+ scs_get_d_zero(&resd, sc2);
390
+ return resd;
391
+ default:
392
+ fprintf(stderr,"ERREUR: %d is not a valid value in s_cos \n", N);
393
+ exit(1);
394
+ }
395
+ return resd;
396
+ }
397
+
398
+
399
+
400
+
401
+
402
+ /*************************************************************
403
+ * Tangent *
404
+ *************************************************************/
405
+
406
+
407
+ /* The main function */
408
+
409
+ static void scs_tan(double x, scs_ptr res_scs){
410
+ scs_t x_scs;
411
+ scs_t x2;
412
+ int i;
413
+ scs_t y_scs;
414
+ int N;
415
+
416
+ scs_set_d(x_scs, x);
417
+
418
+
419
+ N = rem_pio2_scs(y_scs, x_scs); /* x (=sc2) is in [-Pi/4,Pi/4] */
420
+ N = N & 1; /* extract the last bit of N */
421
+ scs_square(x2, y_scs);
422
+
423
+ scs_mul(res_scs, tan_scs_poly_ptr[0], x2);
424
+
425
+ for(i=1; i<(DEGREE_TAN_SCS-1)/2; i++){ /* The last coeff is not read from the file. */
426
+ scs_add(res_scs, tan_scs_poly_ptr[i], res_scs);
427
+ scs_mul(res_scs, res_scs, x2);
428
+ }
429
+
430
+ scs_mul(res_scs, res_scs, y_scs);
431
+ scs_add(res_scs, y_scs, res_scs);
432
+
433
+ if(N==1) {
434
+ scs_inv(res_scs, res_scs);
435
+ res_scs->sign = -res_scs->sign;
436
+ }
437
+ }
438
+
439
+
440
+
441
+
442
+
443
+ double scs_tan_rn(double x){
444
+ scs_t res_scs;
445
+ double resd;
446
+
447
+ #if EVAL_PERF
448
+ crlibm_second_step_taken++;
449
+ #endif
450
+
451
+ scs_tan(x,res_scs);
452
+ scs_get_d(&resd, res_scs);
453
+ return resd;
454
+ }
455
+
456
+
457
+
458
+ double scs_tan_rd(double x){
459
+ scs_t res_scs;
460
+ double resd;
461
+
462
+ #if EVAL_PERF
463
+ crlibm_second_step_taken++;
464
+ #endif
465
+
466
+ scs_tan(x,res_scs);
467
+ scs_get_d_minf(&resd, res_scs);
468
+ return resd;
469
+ }
470
+
471
+
472
+
473
+ double scs_tan_ru(double x){
474
+ scs_t res_scs;
475
+ double resd;
476
+
477
+ #if EVAL_PERF
478
+ crlibm_second_step_taken++;
479
+ #endif
480
+
481
+ scs_tan(x,res_scs);
482
+ scs_get_d_pinf(&resd, res_scs);
483
+ return resd;
484
+ }
485
+
486
+
487
+
488
+ double scs_tan_rz(double x){
489
+ scs_t res_scs;
490
+ double resd;
491
+
492
+ #if EVAL_PERF
493
+ crlibm_second_step_taken++;
494
+ #endif
495
+
496
+ scs_tan(x,res_scs);
497
+ scs_get_d_zero(&resd, res_scs);
498
+ return resd;
499
+ }
500
+
501
+