projects
/
fw
/
sdcc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* src/pic16/devices.inc,
[fw/sdcc]
/
device
/
lib
/
atanf.c
diff --git
a/device/lib/atanf.c
b/device/lib/atanf.c
index a558948a61dedecab29a7c50a6f22d7b5b86b80f..f254ae20b5dbbc524cc261ce8f0c591d2c2429cf 100644
(file)
--- 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) */
#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;
{
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)
f=fabsf(x);
if(f>1.0)
@@
-67,4
+73,3
@@
float atanf(const float x) reentrant
if(x<0.0) r=-r;
return r;
}
if(x<0.0) r=-r;
return r;
}
-