X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Flib%2Fatanf.c;h=135c3f90f7bd17c2e65de5b00973f0f070bf71d8;hb=9d1413651102d4e3d9eef8b2369a3c44df89770e;hp=a558948a61dedecab29a7c50a6f22d7b5b86b80f;hpb=1071a6c6ae98b2f1017cc0bc323860ac0d145d8c;p=fw%2Fsdcc diff --git a/device/lib/atanf.c b/device/lib/atanf.c index a558948a..135c3f90 100644 --- a/device/lib/atanf.c +++ b/device/lib/atanf.c @@ -36,11 +36,17 @@ #define K2 0.7320508076 /* sqrt(3)-1 */ #define K3 1.7320508076 /* sqrt(3) */ -float atanf(const float x) reentrant +#ifdef SDCC_mcs51 + #define myconst code +#else + #define myconst const +#endif + +float atanf(const float x) _FLOAT_FUNC_REENTRANT { float f, r, g; int n=0; - static float a[]={ 0.0, 0.5235987756, 1.5707963268, 1.0471975512 }; + static myconst float a[]={ 0.0, 0.5235987756, 1.5707963268, 1.0471975512 }; f=fabsf(x); if(f>1.0)