You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -290,18 +294,7 @@ f. At the end, close the UAE window\
290
294
<u>Note</u>: after the test, UAE may signal a (false) read error on the Workench disk. This is due to the fact that we modified its configuration while running
291
295
-`libunix` should be tested after you changed the definition of the static libs order in the `Makefile` to put -lunix before -lc (see the commented static_libs lines in the `Makefile` and don't forget to put back the original lines after the test!)
292
296
293
-
If you want to use the libraries in your own project, your code will have to follow the skeleton of the included `main.c` file:
294
-
- Check for the Workbench startup message
295
-
- Assign to the variable __WBenchMsg the value of the pointer to the Workbench startup message, or assign NULL if started from command line
296
-
- Set __exit_blocked to FALSE to push exit() and similar functions to longjmp to target set by setjmp()
297
-
- Declare and open the following libraries: Exec, intuition.library, dos.library, utility.library, graphics.library, commodities.library and icon.library
298
-
- Assign to the variable __UtilityBase the value of UtilityBase
299
-
- Set the target `out:` (which is used by `exit`) through the `setjmp` instruction
300
-
- Call all the constructors, like in the `fcntCallCtor` function (the constructors must be called in a specific order)\
301
-
At the end:
302
-
- At the `out:` target, call the destructors, like in the `fcntCallDtor` function (the destructors must also be called in a specific order)
303
-
- Close all libraries
304
-
- If needed, reply to the Workbench startup message
297
+
If you want to use the libraries in your own project, your code will have to follow the skeleton of the included `main.c` file.
305
298
306
299
It is also mandatory:
307
300
- To declare the static libs in your `Makefile`:\
@@ -327,10 +320,21 @@ b. static_libs := -lm -ldebug -lnet -lunix -lc -lamiga, to use UNIX style paths
327
320
### V1_214
328
321
- First version
329
322
323
+
### V1_214_1
324
+
- Better support of inf and NaN by math functions
325
+
- Added functions __ashldi3, __lshrdi3, getaddrinfo, __clzsi2 and __ctzsi2
326
+
-__time_delay made reentrant
327
+
- Clean in Makefile improved
328
+
- clib compiled to handle floats
329
+
- Fixed code in main to distinguish correctly between start from CLI or Workbench
330
+
- atan2 fixed
331
+
330
332
## Additional credits
331
333
332
334
- Main code is coming from [clib2](https://github.com/adtools/clib2) written by Olaf Barthel.
333
335
334
336
- Code for ffp is coming from [MotoFFP](https://github.com/bayerf42/MotoFFP) and [Le_Lisp](https://github.com/GunterMueller/Le_Lisp/).
335
337
338
+
- Code for getaddrinfo is coming from DNS Tracer
339
+
336
340
- Remaining code (additional functions, adaptations, wrappers) by [JOB](https://github.com/jyoberle).
// For finite values of x not in the range [-1,1], a domain error shall occur, and either a NaN (if supported), or an implementation-defined value shall be returned.
208
+
// If x is NaN, a NaN shall be returned.
209
+
// If x is ±Inf, a domain error shall occur, and a NaN shall be returned.
207
210
double
208
211
acos(doublex)
209
212
{
@@ -215,7 +218,8 @@ acos(double x)
215
218
}
216
219
else
217
220
{
218
-
result=0;
221
+
// result = 0;
222
+
result=nan(NULL); // return nan to be consistent with acosf
// For finite values of x not in the range [-1,1], a domain error shall occur, and either a NaN (if supported), or an implementation-defined value shall be returned.
73
+
// If x is NaN, a NaN shall be returned.
74
+
// If x is ±Inf, a domain error shall occur, and a NaN shall be returned.
72
75
float
73
76
acosf(floatx)
74
77
{
75
78
floatz,p,q,r,w,s,c,df;
76
79
LONGhx,ix;
80
+
77
81
GET_FLOAT_WORD(hx,x);
78
82
ix=hx&0x7fffffff;
83
+
79
84
if(ix==0x3f800000) { /* |x|==1 */
80
85
if(hx>0) return0.0; /* acos(1) = 0 */
81
86
elsereturnpi+(float)2.0*pio2_lo; /* acos(-1)= pi */
// For finite values of x not in the range [-1,1], a domain error shall occur, and either a NaN (if supported), or an implementation-defined value shall be returned.
219
+
// If x is NaN, a NaN shall be returned.
220
+
// If x is ±Inf, a domain error shall occur, and a NaN shall be returned.
218
221
double
219
222
asin(doublex)
220
223
{
@@ -226,7 +229,8 @@ asin(double x)
226
229
}
227
230
else
228
231
{
229
-
result=0;
232
+
// result = 0;
233
+
result=nan(NULL); // return nan to be consistent with asinf
// For finite values of x not in the range [-1,1], a domain error shall occur, and either a NaN (if supported), or an implementation-defined value shall be returned.
75
+
// If x is NaN, a NaN shall be returned.
76
+
// If x is ±Inf, a domain error shall occur, and a NaN shall be returned.
0 commit comments