Raymond Toy pushed to branch issue-435-add-core-math-lisp-support at cmucl / cmucl
Commits:
-
17bef122
by Raymond Toy at 2026-02-26T19:54:09-08:00
-
8034ae1f
by Raymond Toy at 2026-02-26T19:54:09-08:00
-
0419b894
by Raymond Toy at 2026-02-26T20:04:31-08:00
-
3e9d397c
by Raymond Toy at 2026-02-26T20:04:59-08:00
-
312f6839
by Raymond Toy at 2026-02-26T20:07:36-08:00
5 changed files:
Changes:
| ... | ... | @@ -129,15 +129,6 @@ linux:install: |
| 129 | 129 | variables:
|
| 130 | 130 | osname: "linux"
|
| 131 | 131 | CURL: "curl"
|
| 132 | - # These rules are needed so that the static analyzer job can run on a
|
|
| 133 | - # schedule because this is a prerequisite of the analyzer build. A
|
|
| 134 | - # regular push or merge request does the normal stuff.
|
|
| 135 | - rules:
|
|
| 136 | - - if: $CI_PIPELINE_SOURCE == "schedule"
|
|
| 137 | - - if: $CI_PIPELINE_SOURCE == "push"
|
|
| 138 | - - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
| 139 | - - if: $CI_PIPELINE_SOURCE == "branch"
|
|
| 140 | - - if: $CI_PIPELINE_SOURCE == "web"
|
|
| 141 | 132 | |
| 142 | 133 | linux:build:
|
| 143 | 134 | <<: *build_configuration
|
| ... | ... | @@ -150,14 +141,6 @@ linux:build: |
| 150 | 141 | # Fedora 41 must build with gcc because the clang build fails some
|
| 151 | 142 | # ansi-tests. See [#469].
|
| 152 | 143 | CONFIG: "x86_linux"
|
| 153 | - # These rules is needed so that the static analyzer job can run on a
|
|
| 154 | - # schedule because this is a prerequisite of the analyzer build. A
|
|
| 155 | - # regular push or merge request does the normal stuff.
|
|
| 156 | - rules:
|
|
| 157 | - - if: $CI_PIPELINE_SOURCE == "schedule"
|
|
| 158 | - - if: $CI_PIPELINE_SOURCE == "push"
|
|
| 159 | - - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
| 160 | - - if: $CI_PIPELINE_SOURCE == "web"
|
|
| 161 | 144 | |
| 162 | 145 | linux:cross-build:
|
| 163 | 146 | stage: build
|
| ... | ... | @@ -301,18 +284,6 @@ osx:benchmark: |
| 301 | 284 | # the linux-4 directory built in the linux:build job.
|
| 302 | 285 | linux:static-analyzer:
|
| 303 | 286 | stage: analyze
|
| 304 | - # The analyzer is a manual job that isn't normally run. These rules
|
|
| 305 | - # make that happen, but when the pipeline is scheduled we do run the
|
|
| 306 | - # analyzer.
|
|
| 307 | - rules:
|
|
| 308 | - - if: $CI_PIPELINE_SOURCE == "schedule"
|
|
| 309 | - - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
| 310 | - when: manual
|
|
| 311 | - allow_failure: true
|
|
| 312 | - - if: $CI_PIPELINE_SOURCE == "push"
|
|
| 313 | - when: manual
|
|
| 314 | - allow_failure: true
|
|
| 315 | -
|
|
| 316 | 287 |
|
| 317 | 288 | tags:
|
| 318 | 289 | - linux
|
| ... | ... | @@ -323,6 +294,7 @@ linux:static-analyzer: |
| 323 | 294 | needs:
|
| 324 | 295 | - job: linux:build
|
| 325 | 296 | artifacts: true
|
| 297 | + when: manual
|
|
| 326 | 298 | script:
|
| 327 | 299 | # Analysis can generate huge amounts of output. For now just save
|
| 328 | 300 | # the results to the log file instead of also having it go to the
|
| ... | ... | @@ -378,22 +350,14 @@ ubuntu:ansi-test: |
| 378 | 350 | # Checks links on the wiki pages whenever any wiki markdown pages change.
|
| 379 | 351 | markdown-link-check:
|
| 380 | 352 | stage: markdown-link-check
|
| 381 | - # Run the checker when the pipeline is scheduled to run.
|
|
| 382 | - # It's ok if this fails; we don't want to declare the entire
|
|
| 383 | - # pipeline as having failed.
|
|
| 384 | - rules:
|
|
| 385 | - - if: $CI_PIPELINE_SOURCE == "schedule"
|
|
| 386 | - allow_failure: true
|
|
| 387 | - - if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
| 388 | - when: manual
|
|
| 389 | - allow_failure: true
|
|
| 390 | - - if: $CI_PIPELINE_SOURCE == "push"
|
|
| 391 | - when: manual
|
|
| 392 | - allow_failure: true
|
|
| 393 | 353 | |
| 394 | 354 | # Only the linux runner has markdown-link-check installed
|
| 395 | 355 | tags:
|
| 396 | 356 | - linux
|
| 357 | + when: manual
|
|
| 358 | + # It's ok if this fails; we don't want to declare the entire
|
|
| 359 | + # pipeline as having failed.
|
|
| 360 | + allow_failure: true
|
|
| 397 | 361 | script:
|
| 398 | 362 | # Check links in the main repo
|
| 399 | 363 | - find . -name \*.md -print0 | xargs -0 -n1 markdown-link-check
|
| ... | ... | @@ -5084,6 +5084,10 @@ msgstr "" |
| 5084 | 5084 | msgid "Return the arc sine of NUMBER."
|
| 5085 | 5085 | msgstr ""
|
| 5086 | 5086 | |
| 5087 | +#: src/code/irrat.lisp
|
|
| 5088 | +msgid "Execution of a form compiled with errors:~% ~S"
|
|
| 5089 | +msgstr ""
|
|
| 5090 | + |
|
| 5087 | 5091 | #: src/code/irrat.lisp
|
| 5088 | 5092 | msgid "Return the arc cosine of NUMBER."
|
| 5089 | 5093 | msgstr ""
|
| ... | ... | @@ -69,6 +69,7 @@ extern double __ieee754_log10(double x); |
| 69 | 69 | extern double __ieee754_pow(double x, double y);
|
| 70 | 70 | extern double __ieee754_hypot(double x, double y);
|
| 71 | 71 | extern double fdlibm_scalbn(double x, int n);
|
| 72 | +extern double fdlibm_log2(double x);
|
|
| 72 | 73 | |
| 73 | 74 | enum FDLIBM_EXCEPTION {
|
| 74 | 75 | FDLIBM_DIVIDE_BY_ZERO,
|
| ... | ... | @@ -32,6 +32,7 @@ extern double cr_hypot(double, double); |
| 32 | 32 | extern double cr_log1p(double);
|
| 33 | 33 | extern double cr_expm1(double);
|
| 34 | 34 | extern void cr_sincos(double, double *, double *);
|
| 35 | +extern double cr_log2(double);
|
|
| 35 | 36 | |
| 36 | 37 | extern float cr_sinf(float);
|
| 37 | 38 | extern float cr_cosf(float);
|
| ... | ... | @@ -54,6 +55,7 @@ extern float cr_hypotf(float, float); |
| 54 | 55 | extern float cr_log1pf(float);
|
| 55 | 56 | extern float cr_expm1f(float);
|
| 56 | 57 | extern void cr_sincosf(float, float *, float *);
|
| 58 | +extern float cr_log2f(float);
|
|
| 57 | 59 | #endif
|
| 58 | 60 | |
| 59 | 61 | |
| ... | ... | @@ -330,6 +332,16 @@ lisp_sincos(double x, double *s, double *c) |
| 330 | 332 | #endif
|
| 331 | 333 | }
|
| 332 | 334 | |
| 335 | +double
|
|
| 336 | +lisp_log2(double x)
|
|
| 337 | +{
|
|
| 338 | +#ifdef FEATURE_CORE_MATH
|
|
| 339 | + return cr_log2(x);
|
|
| 340 | +#else
|
|
| 341 | + return fdlibm_log2(x);
|
|
| 342 | +#endif
|
|
| 343 | +}
|
|
| 344 | + |
|
| 333 | 345 | /*
|
| 334 | 346 | * The single-float versions of the special functions. When core-math
|
| 335 | 347 | * is set, we use the single-float core-math functions. Otherwise, we
|
| ... | ... | @@ -562,3 +574,13 @@ lisp_sincosf(float x, float *s, float *c) |
| 562 | 574 | *c = (float) dc;
|
| 563 | 575 | #endif
|
| 564 | 576 | }
|
| 577 | + |
|
| 578 | +float
|
|
| 579 | +lisp_log2f(float x)
|
|
| 580 | +{
|
|
| 581 | +#ifdef FEATURE_CORE_MATH
|
|
| 582 | + return cr_log2f(x);
|
|
| 583 | +#else
|
|
| 584 | + return (float) fdlibm_log2((double) x);
|
|
| 585 | +#endif
|
|
| 586 | +} |
| ... | ... | @@ -39,7 +39,7 @@ cp = 9.61796693925975554329e-01, /* 0x3FEEC709, 0xDC3A03FD =2/(3ln2) */ |
| 39 | 39 | cp_h = 9.61796700954437255859e-01, /* 0x3FEEC709, 0xE0000000 =(float)cp */
|
| 40 | 40 | cp_l = -7.02846165095275826516e-09; /* 0xBE3E2FE0, 0x145B01F5 =tail of cp_h*/
|
| 41 | 41 | |
| 42 | -double lisp_log2(double x)
|
|
| 42 | +double fdlibm_log2(double x)
|
|
| 43 | 43 | {
|
| 44 | 44 | double ax;
|
| 45 | 45 | int k, hx, lx, ix;
|