Commit graph

5947 commits

Author SHA1 Message Date
Justin Ethier
0a062177f7 Issue #534 - Bug fix for beta exp bug
Perform full scanning of function application list to ensure self-recursive calls are found. This prevents infinite loops in the beta expansion code when compiling simple recursive calls.
2024-04-02 18:54:15 -07:00
Justin Ethier
59096d9dc2
Merge pull request #533 from justinethier/issue-530-2
Resolve Issue 530
2024-03-14 22:43:32 -04:00
Justin Ethier
82b0f9f3e2 Cleanup 2024-03-14 19:42:42 -07:00
Justin Ethier
07e747a08f Revise doc for issue #530 2024-03-14 18:58:29 -07:00
Justin Ethier
0ea2457db6 Issue #530 - Adding more tests 2024-03-14 18:57:09 -07:00
Justin Ethier
92de62ce14 Issue #530 - Document changes 2024-03-13 19:33:00 -07:00
Justin Ethier
29b4c77922 Cleanup 2024-03-13 19:32:15 -07:00
Justin Ethier
6068b30ded Issue #530 - Handle parsing of +i / -i 2024-03-13 19:31:58 -07:00
Justin Ethier
1f76d474f7 Document fixes to sqrt 2024-03-12 19:25:23 -07:00
Justin Ethier
512e962a9b Add more sqrt tests 2024-03-12 19:22:09 -07:00
Justin Ethier
887e1e5aa9 Return fixnum if sqrt(fixnum) is an exact int 2024-03-12 19:06:54 -07:00
Justin Ethier
32af1bcd05 Removing top-level sqrt
This isn't good enough, there are going to be bootstrap compilation problems undoing this...
2024-03-11 19:29:54 -07:00
Justin Ethier
a2568d8589 Allow inline sqrt 2024-03-11 19:29:44 -07:00
Justin Ethier
fa6213b907 Issue #530 - First cut at improving sqrt
Improving sqrt to properly handle negative parameter values
2024-03-11 19:19:12 -07:00
Justin Ethier
37b39693ed Bump to 0.37.0 2024-03-05 17:54:06 -08:00
Justin Ethier
eb53b0fb16 Document PR fix 2024-03-05 17:53:43 -08:00
Justin Ethier
16a4323d4a Merge branch 'master' of github.com:justinethier/cyclone 2024-03-05 17:52:53 -08:00
Justin Ethier
706f7ef2a8
Merge pull request #528 from yorickhardy/master
Define *ai-v4mapped* to zero on platforms where AI_V4MAPPED is undefined
2024-03-05 20:51:54 -05:00
Justin Ethier
a53f42d082 Merge branch 'master' of github.com:justinethier/cyclone 2024-03-05 17:48:26 -08:00
Yorick Hardy
bb3df95d13 Define *ai-v4mapped* to zero on platforms where AI_V4MAPPED is undefined.
This change defines *ai-v4mapped* to zero when AI_V4MAPPED is undefined
and similarly for *ai-all* (similar to other patches). This allows
(srfi 106) to be available on NetBSD and other platforms without
AI_V4MAPPED and is the recommended behaviour by the author of SRFI-106:

https://srfi-email.schemers.org/srfi-106/msg/2762553/
2024-03-05 22:18:44 +02:00
Justin Ethier
a6aa16de52
Added WASM release instructions 2024-02-19 22:44:02 -05:00
Justin Ethier
03107cadf1
Update Release-Checklist.md 2024-02-13 21:36:54 -05:00
Justin Ethier
54b69b86c8 Prep release 2024-02-13 18:31:23 -08:00
Justin Ethier
b5486887e8 Increment revision number 2024-02-13 18:29:04 -08:00
Justin Ethier
393615e039 Add latest fix 2024-02-13 18:28:56 -08:00
Justin Ethier
42608c77cb
Update Release-Checklist.md 2024-02-13 21:07:15 -05:00
Justin Ethier
17cce16139 Comment out so we don't keep breaking bootstrap
These tests fail on mac and we can't use them in the bootstrap repo
2024-02-13 18:03:03 -08:00
Justin Ethier
5ea2fae5f8
Merge pull request #524 from yorickhardy/master
Implement r7rs round to even behaviour for half integers
2024-02-02 21:31:52 -05:00
Yorick Hardy
4bbceeb4d6 round half-integers to even instead of away from zero
This changes the behaviour to match r7rs (round x) instead of C round(x).

An answer to https://stackoverflow.com/questions/32746523/ieee-754-compliant-round-half-to-even
suggests using remainder(). The following will work if FE_TONEAREST is defined, but C11
requires FE_TONEAREST to be defined if and only if the implemenetation supports it in
fegetround() and fesetround() [Draft N1570]. On the other hand, remainder() must be defined.
C23 will have roundeven(), but this is not yet available on all platforms.
The behaviour of remainder is described in Draft N1570, page 254, footnote 239.

Alternative implementation:

  double round_to_nearest_even(double x)
  {
  #pragma STDC FENV_ACCESS ON
    int mode;
    double nearest;
    mode = fegetround();
    fesetround(FE_TONEAREST);
    nearest = nearbyint(x);
    fesetround(mode);
  #pragma STDC FENV_ACCESS OFF
    return nearest;
  }
2024-02-01 22:25:47 +02:00
Yorick Hardy
7d8f70fb07 add more tests for rounding
r7rs requires (round x) to round to even when x is halfway between
two integers, while C requires round(x) to round away from zero.
2024-02-01 22:23:16 +02:00
Justin Ethier
3b921e7389 Re-format code 2024-01-17 19:43:47 -08:00
Justin Ethier
b44198744b Add indent package 2024-01-11 20:02:07 -08:00
Justin Ethier
00af456166 Initial file 2024-01-11 20:00:29 -08:00
Justin Ethier
405d256e99 Added test-format 2024-01-11 19:58:03 -08:00
Justin Ethier
436a6560cd Use temporary file 2024-01-11 19:57:54 -08:00
Justin Ethier
756e5c1b72 Initial file 2024-01-11 19:54:02 -08:00
Justin Ethier
bc65e31a6a Rename indent to "format" 2024-01-11 19:35:46 -08:00
Justin Ethier
af12489ec6 Expand indent directive 2024-01-11 19:34:59 -08:00
Justin Ethier
fc5a737476
Merge pull request #520 from justinethier/issue-519
Resolve Issue 519
2024-01-10 22:40:36 -05:00
Justin Ethier
bfc0ddc1d7 Remove travis CI link 2024-01-08 19:44:00 -08:00
Justin Ethier
e7725a2a36 Issue #519 - Fix fxlength 2024-01-08 19:00:39 -08:00
Justin Ethier
e4992492b3 Add stub for rationalize 2024-01-08 18:26:38 -08:00
Justin Ethier
88fb4b909f Issue #519 - fix bignum TODO's in Cyc_remainder 2024-01-07 19:40:32 -08:00
Justin Ethier
38276ffd46 Issue #519 - Document latest fixes 2024-01-07 19:31:30 -08:00
Justin Ethier
749d4b6a0c Issue #519 - Properly handle doubles in remainder 2024-01-07 19:29:20 -08:00
Justin Ethier
034d26a18a Initial round of tests 2024-01-07 13:10:38 -08:00
Justin Ethier
d048b3d4f0 Issue #519 - numerator/denominator
Return fixnum or bignum values from this function when they are passed as arg, per R7RS.
2024-01-07 07:44:04 -08:00
Justin Ethier
ffcbca6c3e Issue #519 - Stage new test cases 2024-01-07 07:23:59 -08:00
Justin Ethier
43923a6e44 Issue #519 - Allow truncate-quotient to return fixnums
Return a fixnum when fixnum args are received, per R7RS.
2024-01-06 14:37:36 -08:00
Justin Ethier
1a0f42386b Issue #519 - Return fixnum from div if possible 2024-01-06 14:37:15 -08:00