diff --git a/ChangeLog b/ChangeLog index 3b39eabb4f..918cd8608a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3525,4 +3525,7 @@ * binfmt/libelf: The basic ELF module execution appears fully functional. * configs/shenzhou/src/up_relays.c: Add support for relays from the Shenzhou board. Contributed by Darcy Gong. - + * lib/fixedmath: Moved the old lib/math to lib/fixedmath to make room for + the math library from the Rhombus OS + * lib/math: Now contains the math library from the Rhombus OS by Nick Johnson + (submitted by Darcy Gong). diff --git a/Documentation/NuttxPortingGuide.html b/Documentation/NuttxPortingGuide.html index d8ccfc3404..96c3012952 100644 --- a/Documentation/NuttxPortingGuide.html +++ b/Documentation/NuttxPortingGuide.html @@ -3719,9 +3719,6 @@ void (*notify)(FAR struct pm_callback_s *cb, enum pm_state_e pmstate); Make a raw binary format file used with many different loaders using the GNU objcopy program. This option should not be selected if you are not using the GNU toolchain. -
  • CONFIG_HAVE_LIBM: - Toolchain supports libm.a -
  • CONFIG_HAVE_CXX: Toolchain supports C++ and CXX, CXXFLAGS, and COMPILEXX have been defined in the configurations Make.defs file. diff --git a/configs/README.txt b/configs/README.txt index c7f3db0e7b..4f96dc325b 100644 --- a/configs/README.txt +++ b/configs/README.txt @@ -171,7 +171,6 @@ defconfig -- This is a configuration file similar to the Linux CONFIG_RAW_BINARY - make a raw binary format file used with many different loaders using the GNU objcopy program. This option should not be selected if you are not using the GNU toolchain. - CONFIG_HAVE_LIBM - toolchain supports libm.a CONFIG_HAVE_CXX - toolchain supports C++ and CXX, CXXFLAGS, and COMPILEXX have been defined in the configurations Make.defs file. diff --git a/configs/amber/hello/defconfig b/configs/amber/hello/defconfig index fece8db36b..2439279104 100644 --- a/configs/amber/hello/defconfig +++ b/configs/amber/hello/defconfig @@ -110,7 +110,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/avr32dev1/nsh/defconfig b/configs/avr32dev1/nsh/defconfig index 7e75380c09..3ca2fac382 100755 --- a/configs/avr32dev1/nsh/defconfig +++ b/configs/avr32dev1/nsh/defconfig @@ -136,7 +136,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/avr32dev1/ostest/defconfig b/configs/avr32dev1/ostest/defconfig index b70cbb6af4..ed7280dc60 100755 --- a/configs/avr32dev1/ostest/defconfig +++ b/configs/avr32dev1/ostest/defconfig @@ -136,7 +136,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/c5471evm/httpd/defconfig b/configs/c5471evm/httpd/defconfig index 372fb330f7..52a0fc4bbe 100644 --- a/configs/c5471evm/httpd/defconfig +++ b/configs/c5471evm/httpd/defconfig @@ -86,7 +86,6 @@ CONFIG_NET_C5471_BASET10=n CONFIG_RRLOAD_BINARY=y CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/c5471evm/nettest/defconfig b/configs/c5471evm/nettest/defconfig index 179b4c1854..6da9fa522f 100644 --- a/configs/c5471evm/nettest/defconfig +++ b/configs/c5471evm/nettest/defconfig @@ -57,7 +57,6 @@ CONFIG_DRAM_SIZE=285212672 CONFIG_RRLOAD_BINARY=y CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # C5471 specific device driver settings diff --git a/configs/c5471evm/nsh/defconfig b/configs/c5471evm/nsh/defconfig index 5746f833a2..6b583d31a5 100644 --- a/configs/c5471evm/nsh/defconfig +++ b/configs/c5471evm/nsh/defconfig @@ -86,7 +86,6 @@ CONFIG_NET_C5471_BASET10=n CONFIG_RRLOAD_BINARY=y CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/c5471evm/ostest/defconfig b/configs/c5471evm/ostest/defconfig index e0c6297c13..04ac9677f4 100644 --- a/configs/c5471evm/ostest/defconfig +++ b/configs/c5471evm/ostest/defconfig @@ -86,7 +86,6 @@ CONFIG_NET_C5471_BASET10=n CONFIG_RRLOAD_BINARY=y CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/compal_e88/nsh_highram/defconfig b/configs/compal_e88/nsh_highram/defconfig index 3cf0af6295..b429af6966 100644 --- a/configs/compal_e88/nsh_highram/defconfig +++ b/configs/compal_e88/nsh_highram/defconfig @@ -88,7 +88,6 @@ CONFIG_NET_C5471_BASET10=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/compal_e99/nsh_compalram/defconfig b/configs/compal_e99/nsh_compalram/defconfig index f9bf23af66..52f99bf124 100644 --- a/configs/compal_e99/nsh_compalram/defconfig +++ b/configs/compal_e99/nsh_compalram/defconfig @@ -91,7 +91,6 @@ CONFIG_NET_C5471_BASET10=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/compal_e99/nsh_highram/defconfig b/configs/compal_e99/nsh_highram/defconfig index f5323c664c..b1539c98c9 100644 --- a/configs/compal_e99/nsh_highram/defconfig +++ b/configs/compal_e99/nsh_highram/defconfig @@ -91,7 +91,6 @@ CONFIG_NET_C5471_BASET10=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/demo9s12ne64/ostest/defconfig b/configs/demo9s12ne64/ostest/defconfig index a45fc7e474..5033d82011 100755 --- a/configs/demo9s12ne64/ostest/defconfig +++ b/configs/demo9s12ne64/ostest/defconfig @@ -102,7 +102,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=y CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # Setup for a two-pass build diff --git a/configs/ea3131/nsh/defconfig b/configs/ea3131/nsh/defconfig index 38caf93aaf..c97f521a52 100644 --- a/configs/ea3131/nsh/defconfig +++ b/configs/ea3131/nsh/defconfig @@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ea3131/ostest/defconfig b/configs/ea3131/ostest/defconfig index abc2c8ba54..c66ee51a44 100644 --- a/configs/ea3131/ostest/defconfig +++ b/configs/ea3131/ostest/defconfig @@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ea3131/pgnsh/defconfig b/configs/ea3131/pgnsh/defconfig index f03432e8de..c9e0963580 100644 --- a/configs/ea3131/pgnsh/defconfig +++ b/configs/ea3131/pgnsh/defconfig @@ -114,7 +114,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # Setup for a two-pass build diff --git a/configs/ea3131/usbserial/defconfig b/configs/ea3131/usbserial/defconfig index 3314de254b..1e8f5cf945 100644 --- a/configs/ea3131/usbserial/defconfig +++ b/configs/ea3131/usbserial/defconfig @@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ea3131/usbstorage/defconfig b/configs/ea3131/usbstorage/defconfig index a857523df3..d8088b5dfa 100644 --- a/configs/ea3131/usbstorage/defconfig +++ b/configs/ea3131/usbstorage/defconfig @@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ea3152/ostest/defconfig b/configs/ea3152/ostest/defconfig index 5b7b5b59df..34cf49dfba 100644 --- a/configs/ea3152/ostest/defconfig +++ b/configs/ea3152/ostest/defconfig @@ -109,7 +109,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/eagle100/httpd/defconfig b/configs/eagle100/httpd/defconfig index 7c47f44674..7916569bc0 100644 --- a/configs/eagle100/httpd/defconfig +++ b/configs/eagle100/httpd/defconfig @@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/eagle100/nettest/defconfig b/configs/eagle100/nettest/defconfig index 4f27210454..6f47953863 100644 --- a/configs/eagle100/nettest/defconfig +++ b/configs/eagle100/nettest/defconfig @@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/eagle100/nsh/defconfig b/configs/eagle100/nsh/defconfig index 4848e957bf..b50413db0e 100644 --- a/configs/eagle100/nsh/defconfig +++ b/configs/eagle100/nsh/defconfig @@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/eagle100/nxflat/defconfig b/configs/eagle100/nxflat/defconfig index 01931b0d3a..98029ddd83 100644 --- a/configs/eagle100/nxflat/defconfig +++ b/configs/eagle100/nxflat/defconfig @@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/eagle100/ostest/defconfig b/configs/eagle100/ostest/defconfig index 13a316ca44..f3634aa55f 100644 --- a/configs/eagle100/ostest/defconfig +++ b/configs/eagle100/ostest/defconfig @@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/eagle100/thttpd/defconfig b/configs/eagle100/thttpd/defconfig index 412a89e9cf..d68d51acfc 100644 --- a/configs/eagle100/thttpd/defconfig +++ b/configs/eagle100/thttpd/defconfig @@ -115,7 +115,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ekk-lm3s9b96/nsh/defconfig b/configs/ekk-lm3s9b96/nsh/defconfig index 11407295fd..2a1a0552d2 100644 --- a/configs/ekk-lm3s9b96/nsh/defconfig +++ b/configs/ekk-lm3s9b96/nsh/defconfig @@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ekk-lm3s9b96/ostest/defconfig b/configs/ekk-lm3s9b96/ostest/defconfig index 734ad031e2..c465cb8b7c 100644 --- a/configs/ekk-lm3s9b96/ostest/defconfig +++ b/configs/ekk-lm3s9b96/ostest/defconfig @@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ez80f910200kitg/ostest/defconfig b/configs/ez80f910200kitg/ostest/defconfig index 22b6275429..9ceb261b22 100644 --- a/configs/ez80f910200kitg/ostest/defconfig +++ b/configs/ez80f910200kitg/ostest/defconfig @@ -94,7 +94,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ez80f910200zco/dhcpd/defconfig b/configs/ez80f910200zco/dhcpd/defconfig index ea9844dc2e..a20e86a45a 100644 --- a/configs/ez80f910200zco/dhcpd/defconfig +++ b/configs/ez80f910200zco/dhcpd/defconfig @@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ez80f910200zco/httpd/defconfig b/configs/ez80f910200zco/httpd/defconfig index ddf34285ab..cccecf2bfc 100644 --- a/configs/ez80f910200zco/httpd/defconfig +++ b/configs/ez80f910200zco/httpd/defconfig @@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ez80f910200zco/nettest/defconfig b/configs/ez80f910200zco/nettest/defconfig index 7b1415bf4b..e018164b01 100644 --- a/configs/ez80f910200zco/nettest/defconfig +++ b/configs/ez80f910200zco/nettest/defconfig @@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ez80f910200zco/nsh/defconfig b/configs/ez80f910200zco/nsh/defconfig index fa701253d6..34fbe603d1 100644 --- a/configs/ez80f910200zco/nsh/defconfig +++ b/configs/ez80f910200zco/nsh/defconfig @@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ez80f910200zco/ostest/defconfig b/configs/ez80f910200zco/ostest/defconfig index f16ddee39f..1954b7a5d8 100644 --- a/configs/ez80f910200zco/ostest/defconfig +++ b/configs/ez80f910200zco/ostest/defconfig @@ -96,7 +96,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ez80f910200zco/poll/defconfig b/configs/ez80f910200zco/poll/defconfig index 6ad505dc56..a98526466a 100644 --- a/configs/ez80f910200zco/poll/defconfig +++ b/configs/ez80f910200zco/poll/defconfig @@ -97,7 +97,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/fire-stm32v2/nsh/defconfig b/configs/fire-stm32v2/nsh/defconfig index 5edde6ed12..f126c51fd6 100644 --- a/configs/fire-stm32v2/nsh/defconfig +++ b/configs/fire-stm32v2/nsh/defconfig @@ -509,7 +509,6 @@ CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/hymini-stm32v/buttons/defconfig b/configs/hymini-stm32v/buttons/defconfig index 44dcf3c41a..8ee2c1d763 100644 --- a/configs/hymini-stm32v/buttons/defconfig +++ b/configs/hymini-stm32v/buttons/defconfig @@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/hymini-stm32v/nsh/defconfig b/configs/hymini-stm32v/nsh/defconfig index 52da9f6f62..f18194bce5 100755 --- a/configs/hymini-stm32v/nsh/defconfig +++ b/configs/hymini-stm32v/nsh/defconfig @@ -160,7 +160,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/hymini-stm32v/nsh2/defconfig b/configs/hymini-stm32v/nsh2/defconfig index fbd9d23b36..b11895c9b1 100644 --- a/configs/hymini-stm32v/nsh2/defconfig +++ b/configs/hymini-stm32v/nsh2/defconfig @@ -165,7 +165,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n CONFIG_RTC=y diff --git a/configs/hymini-stm32v/nx/defconfig b/configs/hymini-stm32v/nx/defconfig index e411baf835..b46c68e293 100644 --- a/configs/hymini-stm32v/nx/defconfig +++ b/configs/hymini-stm32v/nx/defconfig @@ -160,7 +160,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/hymini-stm32v/nxlines/defconfig b/configs/hymini-stm32v/nxlines/defconfig index 689b17376a..863e7a327d 100644 --- a/configs/hymini-stm32v/nxlines/defconfig +++ b/configs/hymini-stm32v/nxlines/defconfig @@ -164,7 +164,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/hymini-stm32v/usbserial/defconfig b/configs/hymini-stm32v/usbserial/defconfig index 7883db8273..a6ed06dee9 100755 --- a/configs/hymini-stm32v/usbserial/defconfig +++ b/configs/hymini-stm32v/usbserial/defconfig @@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/hymini-stm32v/usbstorage/defconfig b/configs/hymini-stm32v/usbstorage/defconfig index c3434e3a46..7d75577fe5 100755 --- a/configs/hymini-stm32v/usbstorage/defconfig +++ b/configs/hymini-stm32v/usbstorage/defconfig @@ -161,7 +161,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/kwikstik-k40/ostest/defconfig b/configs/kwikstik-k40/ostest/defconfig index 2cf29894b2..a811ee0632 100755 --- a/configs/kwikstik-k40/ostest/defconfig +++ b/configs/kwikstik-k40/ostest/defconfig @@ -172,7 +172,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lincoln60/nsh/defconfig b/configs/lincoln60/nsh/defconfig index 43944f0a68..bb08a7deca 100644 --- a/configs/lincoln60/nsh/defconfig +++ b/configs/lincoln60/nsh/defconfig @@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lincoln60/ostest/defconfig b/configs/lincoln60/ostest/defconfig index 6dd51eb07d..0576d018fa 100644 --- a/configs/lincoln60/ostest/defconfig +++ b/configs/lincoln60/ostest/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lm3s6432-s2e/nsh/defconfig b/configs/lm3s6432-s2e/nsh/defconfig index f0cf503efb..d203b29546 100644 --- a/configs/lm3s6432-s2e/nsh/defconfig +++ b/configs/lm3s6432-s2e/nsh/defconfig @@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lm3s6432-s2e/ostest/defconfig b/configs/lm3s6432-s2e/ostest/defconfig index daeac0177d..02b7dbd314 100644 --- a/configs/lm3s6432-s2e/ostest/defconfig +++ b/configs/lm3s6432-s2e/ostest/defconfig @@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lm3s6965-ek/nsh/defconfig b/configs/lm3s6965-ek/nsh/defconfig index 2771a3dc93..5afac6e6fb 100755 --- a/configs/lm3s6965-ek/nsh/defconfig +++ b/configs/lm3s6965-ek/nsh/defconfig @@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lm3s6965-ek/nx/defconfig b/configs/lm3s6965-ek/nx/defconfig index 83b338161c..b6cb0cad5a 100755 --- a/configs/lm3s6965-ek/nx/defconfig +++ b/configs/lm3s6965-ek/nx/defconfig @@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General SPI interface configuration diff --git a/configs/lm3s6965-ek/ostest/defconfig b/configs/lm3s6965-ek/ostest/defconfig index 0bfe9ef720..da35e55314 100755 --- a/configs/lm3s6965-ek/ostest/defconfig +++ b/configs/lm3s6965-ek/ostest/defconfig @@ -132,7 +132,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lm3s8962-ek/nsh/defconfig b/configs/lm3s8962-ek/nsh/defconfig index 001a873874..2a80e84e70 100755 --- a/configs/lm3s8962-ek/nsh/defconfig +++ b/configs/lm3s8962-ek/nsh/defconfig @@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lm3s8962-ek/nx/defconfig b/configs/lm3s8962-ek/nx/defconfig index dbae4b2aa7..51063f7558 100755 --- a/configs/lm3s8962-ek/nx/defconfig +++ b/configs/lm3s8962-ek/nx/defconfig @@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General SPI interface configuration diff --git a/configs/lm3s8962-ek/ostest/defconfig b/configs/lm3s8962-ek/ostest/defconfig index aeb0a1ecf8..c540b1d7f6 100755 --- a/configs/lm3s8962-ek/ostest/defconfig +++ b/configs/lm3s8962-ek/ostest/defconfig @@ -131,7 +131,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lpc4330-xplorer/nsh/defconfig b/configs/lpc4330-xplorer/nsh/defconfig index e4269ea67d..a97b9f789e 100644 --- a/configs/lpc4330-xplorer/nsh/defconfig +++ b/configs/lpc4330-xplorer/nsh/defconfig @@ -191,7 +191,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lpc4330-xplorer/ostest/defconfig b/configs/lpc4330-xplorer/ostest/defconfig index d5ac58ef17..cddf7d0e8f 100644 --- a/configs/lpc4330-xplorer/ostest/defconfig +++ b/configs/lpc4330-xplorer/ostest/defconfig @@ -189,7 +189,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lpcxpresso-lpc1768/dhcpd/defconfig b/configs/lpcxpresso-lpc1768/dhcpd/defconfig index 01c54fa9fe..92aa13f7b0 100755 --- a/configs/lpcxpresso-lpc1768/dhcpd/defconfig +++ b/configs/lpcxpresso-lpc1768/dhcpd/defconfig @@ -154,7 +154,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lpcxpresso-lpc1768/nsh/defconfig b/configs/lpcxpresso-lpc1768/nsh/defconfig index 6d0be84007..0e149e1864 100755 --- a/configs/lpcxpresso-lpc1768/nsh/defconfig +++ b/configs/lpcxpresso-lpc1768/nsh/defconfig @@ -157,7 +157,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lpcxpresso-lpc1768/nx/defconfig b/configs/lpcxpresso-lpc1768/nx/defconfig index a94571a835..88a2cd7a22 100755 --- a/configs/lpcxpresso-lpc1768/nx/defconfig +++ b/configs/lpcxpresso-lpc1768/nx/defconfig @@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General SPI interface configuration diff --git a/configs/lpcxpresso-lpc1768/ostest/defconfig b/configs/lpcxpresso-lpc1768/ostest/defconfig index f58c78773e..1fa3e79bce 100755 --- a/configs/lpcxpresso-lpc1768/ostest/defconfig +++ b/configs/lpcxpresso-lpc1768/ostest/defconfig @@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lpcxpresso-lpc1768/thttpd/defconfig b/configs/lpcxpresso-lpc1768/thttpd/defconfig index 08d251d431..3d014d2914 100755 --- a/configs/lpcxpresso-lpc1768/thttpd/defconfig +++ b/configs/lpcxpresso-lpc1768/thttpd/defconfig @@ -154,7 +154,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/lpcxpresso-lpc1768/usbstorage/defconfig b/configs/lpcxpresso-lpc1768/usbstorage/defconfig index 08f4ad1cfa..8e51d52057 100755 --- a/configs/lpcxpresso-lpc1768/usbstorage/defconfig +++ b/configs/lpcxpresso-lpc1768/usbstorage/defconfig @@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/m68332evb/defconfig b/configs/m68332evb/defconfig index e3e8110a7d..39b3c77324 100644 --- a/configs/m68332evb/defconfig +++ b/configs/m68332evb/defconfig @@ -67,7 +67,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mbed/hidkbd/defconfig b/configs/mbed/hidkbd/defconfig index 3ec6912765..3c31b2f926 100644 --- a/configs/mbed/hidkbd/defconfig +++ b/configs/mbed/hidkbd/defconfig @@ -153,7 +153,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mbed/nsh/defconfig b/configs/mbed/nsh/defconfig index dba89ec7b7..fca08b577b 100755 --- a/configs/mbed/nsh/defconfig +++ b/configs/mbed/nsh/defconfig @@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mcu123-lpc214x/composite/defconfig b/configs/mcu123-lpc214x/composite/defconfig index 6a6e5819cf..0599fed14f 100644 --- a/configs/mcu123-lpc214x/composite/defconfig +++ b/configs/mcu123-lpc214x/composite/defconfig @@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mcu123-lpc214x/nsh/defconfig b/configs/mcu123-lpc214x/nsh/defconfig index 7a514163c3..e2d37a938c 100644 --- a/configs/mcu123-lpc214x/nsh/defconfig +++ b/configs/mcu123-lpc214x/nsh/defconfig @@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mcu123-lpc214x/ostest/defconfig b/configs/mcu123-lpc214x/ostest/defconfig index 724459e806..5fc7df5c75 100644 --- a/configs/mcu123-lpc214x/ostest/defconfig +++ b/configs/mcu123-lpc214x/ostest/defconfig @@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mcu123-lpc214x/usbserial/defconfig b/configs/mcu123-lpc214x/usbserial/defconfig index c746c5732b..c35d804868 100644 --- a/configs/mcu123-lpc214x/usbserial/defconfig +++ b/configs/mcu123-lpc214x/usbserial/defconfig @@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mcu123-lpc214x/usbstorage/defconfig b/configs/mcu123-lpc214x/usbstorage/defconfig index d46ab7c3c5..a25f2e170b 100644 --- a/configs/mcu123-lpc214x/usbstorage/defconfig +++ b/configs/mcu123-lpc214x/usbstorage/defconfig @@ -90,7 +90,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/micropendous3/hello/defconfig b/configs/micropendous3/hello/defconfig index 4e0ea0e997..63a8f249c8 100644 --- a/configs/micropendous3/hello/defconfig +++ b/configs/micropendous3/hello/defconfig @@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mirtoo/nsh/defconfig b/configs/mirtoo/nsh/defconfig index 4e3cb684e6..0883cc9ea0 100644 --- a/configs/mirtoo/nsh/defconfig +++ b/configs/mirtoo/nsh/defconfig @@ -163,7 +163,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mirtoo/nxffs/defconfig b/configs/mirtoo/nxffs/defconfig index 31e3ef89b1..f2f5286e65 100644 --- a/configs/mirtoo/nxffs/defconfig +++ b/configs/mirtoo/nxffs/defconfig @@ -163,7 +163,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mirtoo/ostest/defconfig b/configs/mirtoo/ostest/defconfig index a3af96fbcf..77b3e38b83 100644 --- a/configs/mirtoo/ostest/defconfig +++ b/configs/mirtoo/ostest/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/mx1ads/ostest/defconfig b/configs/mx1ads/ostest/defconfig index 9e425975df..55b3c72b8c 100644 --- a/configs/mx1ads/ostest/defconfig +++ b/configs/mx1ads/ostest/defconfig @@ -96,7 +96,6 @@ CONFIG_SPI2_DISABLE=y CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ne64badge/ostest/defconfig b/configs/ne64badge/ostest/defconfig index ee36399f15..c101aa01b0 100755 --- a/configs/ne64badge/ostest/defconfig +++ b/configs/ne64badge/ostest/defconfig @@ -108,7 +108,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=y CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # Setup for a two-pass build diff --git a/configs/ntosd-dm320/nettest/defconfig b/configs/ntosd-dm320/nettest/defconfig index 1786380545..297df2173f 100644 --- a/configs/ntosd-dm320/nettest/defconfig +++ b/configs/ntosd-dm320/nettest/defconfig @@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ntosd-dm320/nsh/defconfig b/configs/ntosd-dm320/nsh/defconfig index 33cf33c24c..2b02c2d4e4 100644 --- a/configs/ntosd-dm320/nsh/defconfig +++ b/configs/ntosd-dm320/nsh/defconfig @@ -87,7 +87,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ntosd-dm320/ostest/defconfig b/configs/ntosd-dm320/ostest/defconfig index 52ebe0bd9b..a9fca828af 100644 --- a/configs/ntosd-dm320/ostest/defconfig +++ b/configs/ntosd-dm320/ostest/defconfig @@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ntosd-dm320/poll/defconfig b/configs/ntosd-dm320/poll/defconfig index f27dcc2c32..08f75e6b6a 100644 --- a/configs/ntosd-dm320/poll/defconfig +++ b/configs/ntosd-dm320/poll/defconfig @@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ntosd-dm320/thttpd/defconfig b/configs/ntosd-dm320/thttpd/defconfig index becec2ef17..d2de4c167d 100644 --- a/configs/ntosd-dm320/thttpd/defconfig +++ b/configs/ntosd-dm320/thttpd/defconfig @@ -89,7 +89,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ntosd-dm320/udp/defconfig b/configs/ntosd-dm320/udp/defconfig index 869f2e442e..de3b240560 100644 --- a/configs/ntosd-dm320/udp/defconfig +++ b/configs/ntosd-dm320/udp/defconfig @@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ntosd-dm320/uip/defconfig b/configs/ntosd-dm320/uip/defconfig index 19ffe452a9..281a63bd0c 100644 --- a/configs/ntosd-dm320/uip/defconfig +++ b/configs/ntosd-dm320/uip/defconfig @@ -88,7 +88,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/nucleus2g/nsh/defconfig b/configs/nucleus2g/nsh/defconfig index 080c487705..5bc94e607e 100755 --- a/configs/nucleus2g/nsh/defconfig +++ b/configs/nucleus2g/nsh/defconfig @@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/nucleus2g/ostest/defconfig b/configs/nucleus2g/ostest/defconfig index 02eb316339..945e82a057 100755 --- a/configs/nucleus2g/ostest/defconfig +++ b/configs/nucleus2g/ostest/defconfig @@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/nucleus2g/usbserial/defconfig b/configs/nucleus2g/usbserial/defconfig index 300d30ab31..25804407f3 100755 --- a/configs/nucleus2g/usbserial/defconfig +++ b/configs/nucleus2g/usbserial/defconfig @@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/nucleus2g/usbstorage/defconfig b/configs/nucleus2g/usbstorage/defconfig index 7887818fbc..cc677b9f44 100755 --- a/configs/nucleus2g/usbstorage/defconfig +++ b/configs/nucleus2g/usbstorage/defconfig @@ -149,7 +149,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/ftpc/defconfig b/configs/olimex-lpc1766stk/ftpc/defconfig index 6d1375e92c..7cf2e0e880 100755 --- a/configs/olimex-lpc1766stk/ftpc/defconfig +++ b/configs/olimex-lpc1766stk/ftpc/defconfig @@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/hidkbd/defconfig b/configs/olimex-lpc1766stk/hidkbd/defconfig index 7c9fe4c4e5..ac94ecfb86 100755 --- a/configs/olimex-lpc1766stk/hidkbd/defconfig +++ b/configs/olimex-lpc1766stk/hidkbd/defconfig @@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/nettest/defconfig b/configs/olimex-lpc1766stk/nettest/defconfig index 628ff01124..7e662fb97a 100755 --- a/configs/olimex-lpc1766stk/nettest/defconfig +++ b/configs/olimex-lpc1766stk/nettest/defconfig @@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/nsh/defconfig b/configs/olimex-lpc1766stk/nsh/defconfig index d5333a9f33..b12dd731a9 100755 --- a/configs/olimex-lpc1766stk/nsh/defconfig +++ b/configs/olimex-lpc1766stk/nsh/defconfig @@ -159,7 +159,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/nx/defconfig b/configs/olimex-lpc1766stk/nx/defconfig index d86b8b83fd..0235c29b5f 100755 --- a/configs/olimex-lpc1766stk/nx/defconfig +++ b/configs/olimex-lpc1766stk/nx/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General SPI interface configuration diff --git a/configs/olimex-lpc1766stk/ostest/defconfig b/configs/olimex-lpc1766stk/ostest/defconfig index a11c022764..fcc2bba448 100755 --- a/configs/olimex-lpc1766stk/ostest/defconfig +++ b/configs/olimex-lpc1766stk/ostest/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/slip-httpd/defconfig b/configs/olimex-lpc1766stk/slip-httpd/defconfig index 32092d216f..94d5da763f 100755 --- a/configs/olimex-lpc1766stk/slip-httpd/defconfig +++ b/configs/olimex-lpc1766stk/slip-httpd/defconfig @@ -158,7 +158,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/thttpd/defconfig b/configs/olimex-lpc1766stk/thttpd/defconfig index 94ac19f42e..c14e1362b6 100755 --- a/configs/olimex-lpc1766stk/thttpd/defconfig +++ b/configs/olimex-lpc1766stk/thttpd/defconfig @@ -156,7 +156,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/usbserial/defconfig b/configs/olimex-lpc1766stk/usbserial/defconfig index 2bd892cc30..e1216d8968 100755 --- a/configs/olimex-lpc1766stk/usbserial/defconfig +++ b/configs/olimex-lpc1766stk/usbserial/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/usbstorage/defconfig b/configs/olimex-lpc1766stk/usbstorage/defconfig index 8b55cc94d8..2f91efe474 100755 --- a/configs/olimex-lpc1766stk/usbstorage/defconfig +++ b/configs/olimex-lpc1766stk/usbstorage/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc1766stk/wlan/defconfig b/configs/olimex-lpc1766stk/wlan/defconfig index 4d73807e0c..aa896c30ce 100755 --- a/configs/olimex-lpc1766stk/wlan/defconfig +++ b/configs/olimex-lpc1766stk/wlan/defconfig @@ -150,7 +150,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc2378/nsh/defconfig b/configs/olimex-lpc2378/nsh/defconfig index 7311d0c20f..30801a6ab4 100755 --- a/configs/olimex-lpc2378/nsh/defconfig +++ b/configs/olimex-lpc2378/nsh/defconfig @@ -110,7 +110,6 @@ CONFIG_UART2_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-lpc2378/ostest/defconfig b/configs/olimex-lpc2378/ostest/defconfig index b96aadd87f..129bb7fbe5 100755 --- a/configs/olimex-lpc2378/ostest/defconfig +++ b/configs/olimex-lpc2378/ostest/defconfig @@ -110,7 +110,6 @@ CONFIG_UART2_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-stm32-p107/nsh/defconfig b/configs/olimex-stm32-p107/nsh/defconfig index 67a153f9a2..9b9a72dcdb 100644 --- a/configs/olimex-stm32-p107/nsh/defconfig +++ b/configs/olimex-stm32-p107/nsh/defconfig @@ -198,7 +198,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-stm32-p107/ostest/defconfig b/configs/olimex-stm32-p107/ostest/defconfig index 26a8470d26..21aa07875a 100644 --- a/configs/olimex-stm32-p107/ostest/defconfig +++ b/configs/olimex-stm32-p107/ostest/defconfig @@ -208,7 +208,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-strp711/nettest/defconfig b/configs/olimex-strp711/nettest/defconfig index c401fe8c69..eb8c911088 100755 --- a/configs/olimex-strp711/nettest/defconfig +++ b/configs/olimex-strp711/nettest/defconfig @@ -128,7 +128,6 @@ CONFIG_UART3_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-strp711/nsh/defconfig b/configs/olimex-strp711/nsh/defconfig index 985e3690ee..2deb556408 100644 --- a/configs/olimex-strp711/nsh/defconfig +++ b/configs/olimex-strp711/nsh/defconfig @@ -128,7 +128,6 @@ CONFIG_UART3_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/olimex-strp711/ostest/defconfig b/configs/olimex-strp711/ostest/defconfig index cdac22b9f6..e60b7349f1 100644 --- a/configs/olimex-strp711/ostest/defconfig +++ b/configs/olimex-strp711/ostest/defconfig @@ -128,7 +128,6 @@ CONFIG_UART3_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pcblogic-pic32mx/nsh/defconfig b/configs/pcblogic-pic32mx/nsh/defconfig index 1e439e4667..3a480d7865 100644 --- a/configs/pcblogic-pic32mx/nsh/defconfig +++ b/configs/pcblogic-pic32mx/nsh/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pcblogic-pic32mx/ostest/defconfig b/configs/pcblogic-pic32mx/ostest/defconfig index 868ba46695..da8ff40edb 100644 --- a/configs/pcblogic-pic32mx/ostest/defconfig +++ b/configs/pcblogic-pic32mx/ostest/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pic32-starterkit/nsh/defconfig b/configs/pic32-starterkit/nsh/defconfig index 17cb151a76..17fbd6f4ec 100644 --- a/configs/pic32-starterkit/nsh/defconfig +++ b/configs/pic32-starterkit/nsh/defconfig @@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pic32-starterkit/nsh2/defconfig b/configs/pic32-starterkit/nsh2/defconfig index c751591b21..0eec631180 100644 --- a/configs/pic32-starterkit/nsh2/defconfig +++ b/configs/pic32-starterkit/nsh2/defconfig @@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pic32-starterkit/ostest/defconfig b/configs/pic32-starterkit/ostest/defconfig index c8e32419ea..e386b59360 100644 --- a/configs/pic32-starterkit/ostest/defconfig +++ b/configs/pic32-starterkit/ostest/defconfig @@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pic32mx7mmb/nsh/defconfig b/configs/pic32mx7mmb/nsh/defconfig index 0523636563..c55e802093 100644 --- a/configs/pic32mx7mmb/nsh/defconfig +++ b/configs/pic32mx7mmb/nsh/defconfig @@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pic32mx7mmb/ostest/defconfig b/configs/pic32mx7mmb/ostest/defconfig index 851f6022f2..a2e653a563 100644 --- a/configs/pic32mx7mmb/ostest/defconfig +++ b/configs/pic32mx7mmb/ostest/defconfig @@ -215,7 +215,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/pjrc-8051/defconfig b/configs/pjrc-8051/defconfig index 0232376cf2..c223f64e18 100644 --- a/configs/pjrc-8051/defconfig +++ b/configs/pjrc-8051/defconfig @@ -66,7 +66,6 @@ CONFIG_LED_DEBUG=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/qemu-i486/nsh/defconfig b/configs/qemu-i486/nsh/defconfig index 9085eb5fa4..b693c94f76 100644 --- a/configs/qemu-i486/nsh/defconfig +++ b/configs/qemu-i486/nsh/defconfig @@ -195,7 +195,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/qemu-i486/ostest/defconfig b/configs/qemu-i486/ostest/defconfig index a9867fdc98..63c27a2317 100644 --- a/configs/qemu-i486/ostest/defconfig +++ b/configs/qemu-i486/ostest/defconfig @@ -127,7 +127,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/rgmp/arm/default/defconfig b/configs/rgmp/arm/default/defconfig index 186c687248..a78500bf4c 100644 --- a/configs/rgmp/arm/default/defconfig +++ b/configs/rgmp/arm/default/defconfig @@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # Sizes of configurable things (0 disables) diff --git a/configs/rgmp/arm/nsh/defconfig b/configs/rgmp/arm/nsh/defconfig index 8fbbc7b8b4..bee14b0a2a 100644 --- a/configs/rgmp/arm/nsh/defconfig +++ b/configs/rgmp/arm/nsh/defconfig @@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # Sizes of configurable things (0 disables) diff --git a/configs/rgmp/x86/default/defconfig b/configs/rgmp/x86/default/defconfig index 9b4b58d89c..e36c397661 100644 --- a/configs/rgmp/x86/default/defconfig +++ b/configs/rgmp/x86/default/defconfig @@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # Sizes of configurable things (0 disables) diff --git a/configs/rgmp/x86/nsh/defconfig b/configs/rgmp/x86/nsh/defconfig index 7af320ff72..6afe9c9a9e 100644 --- a/configs/rgmp/x86/nsh/defconfig +++ b/configs/rgmp/x86/nsh/defconfig @@ -124,7 +124,6 @@ CONFIG_ARCH_STDBOOL_H=y CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # Sizes of configurable things (0 disables) diff --git a/configs/sam3u-ek/knsh/defconfig b/configs/sam3u-ek/knsh/defconfig index 9aba512edf..416ca3fa3a 100755 --- a/configs/sam3u-ek/knsh/defconfig +++ b/configs/sam3u-ek/knsh/defconfig @@ -144,7 +144,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # Setup for a two-pass build diff --git a/configs/sam3u-ek/nsh/defconfig b/configs/sam3u-ek/nsh/defconfig index 02b9804183..69a2081ff2 100755 --- a/configs/sam3u-ek/nsh/defconfig +++ b/configs/sam3u-ek/nsh/defconfig @@ -139,7 +139,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/sam3u-ek/nx/defconfig b/configs/sam3u-ek/nx/defconfig index 82e9e3cbc4..aae6aa5fa1 100755 --- a/configs/sam3u-ek/nx/defconfig +++ b/configs/sam3u-ek/nx/defconfig @@ -139,7 +139,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/sam3u-ek/ostest/defconfig b/configs/sam3u-ek/ostest/defconfig index da582acb65..14b8eaa6ee 100755 --- a/configs/sam3u-ek/ostest/defconfig +++ b/configs/sam3u-ek/ostest/defconfig @@ -140,7 +140,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/sam3u-ek/touchscreen/defconfig b/configs/sam3u-ek/touchscreen/defconfig index f3ced72cc4..cd1fec7d1d 100755 --- a/configs/sam3u-ek/touchscreen/defconfig +++ b/configs/sam3u-ek/touchscreen/defconfig @@ -146,7 +146,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/shenzhou/nsh/defconfig b/configs/shenzhou/nsh/defconfig index fdc065c48e..b37da788e3 100644 --- a/configs/shenzhou/nsh/defconfig +++ b/configs/shenzhou/nsh/defconfig @@ -452,7 +452,6 @@ CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/shenzhou/nxwm/defconfig b/configs/shenzhou/nxwm/defconfig index e4316d1fe7..a5ccc8bfbe 100644 --- a/configs/shenzhou/nxwm/defconfig +++ b/configs/shenzhou/nxwm/defconfig @@ -552,7 +552,6 @@ CONFIG_STDIO_BUFFER_SIZE=64 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/shenzhou/thttpd/defconfig b/configs/shenzhou/thttpd/defconfig index 5fd158cc64..82884f4c3f 100644 --- a/configs/shenzhou/thttpd/defconfig +++ b/configs/shenzhou/thttpd/defconfig @@ -452,7 +452,6 @@ CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/sim/mount/defconfig b/configs/sim/mount/defconfig index b980b38dda..7caa878525 100644 --- a/configs/sim/mount/defconfig +++ b/configs/sim/mount/defconfig @@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/nettest/defconfig b/configs/sim/nettest/defconfig index d724046409..c216e2edc8 100644 --- a/configs/sim/nettest/defconfig +++ b/configs/sim/nettest/defconfig @@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/nsh/defconfig b/configs/sim/nsh/defconfig index cd1fc8c7b3..a217dd71d7 100644 --- a/configs/sim/nsh/defconfig +++ b/configs/sim/nsh/defconfig @@ -143,7 +143,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/nsh2/defconfig b/configs/sim/nsh2/defconfig index 787e388c7d..0e93cd4810 100644 --- a/configs/sim/nsh2/defconfig +++ b/configs/sim/nsh2/defconfig @@ -153,7 +153,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/nx/defconfig b/configs/sim/nx/defconfig index 5b48d72a71..d5cad6741b 100644 --- a/configs/sim/nx/defconfig +++ b/configs/sim/nx/defconfig @@ -129,7 +129,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/nx11/defconfig b/configs/sim/nx11/defconfig index 43d57bd50a..0ac3362be2 100644 --- a/configs/sim/nx11/defconfig +++ b/configs/sim/nx11/defconfig @@ -136,7 +136,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/nxffs/defconfig b/configs/sim/nxffs/defconfig index c30227bd84..79f5b0f93a 100644 --- a/configs/sim/nxffs/defconfig +++ b/configs/sim/nxffs/defconfig @@ -119,7 +119,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/nxwm/defconfig b/configs/sim/nxwm/defconfig index d34202e05c..9029b3b2f1 100644 --- a/configs/sim/nxwm/defconfig +++ b/configs/sim/nxwm/defconfig @@ -153,7 +153,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/ostest/defconfig b/configs/sim/ostest/defconfig index 0d3669a25b..a2fbd9f050 100644 --- a/configs/sim/ostest/defconfig +++ b/configs/sim/ostest/defconfig @@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/pashello/defconfig b/configs/sim/pashello/defconfig index e3cf3a7b5b..b40ec626ec 100644 --- a/configs/sim/pashello/defconfig +++ b/configs/sim/pashello/defconfig @@ -118,7 +118,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/sim/touchscreen/defconfig b/configs/sim/touchscreen/defconfig index b112449b39..6a2e3e304d 100644 --- a/configs/sim/touchscreen/defconfig +++ b/configs/sim/touchscreen/defconfig @@ -135,7 +135,6 @@ CONFIG_ARCH_BZERO=n CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=y # # Sizes of configurable things (0 disables) diff --git a/configs/skp16c26/ostest/defconfig b/configs/skp16c26/ostest/defconfig index 8cb2eb4691..f3370d48cb 100644 --- a/configs/skp16c26/ostest/defconfig +++ b/configs/skp16c26/ostest/defconfig @@ -93,7 +93,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=y CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/RIDE/defconfig b/configs/stm3210e-eval/RIDE/defconfig index f4593d5ea0..7032bd975b 100755 --- a/configs/stm3210e-eval/RIDE/defconfig +++ b/configs/stm3210e-eval/RIDE/defconfig @@ -165,7 +165,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/buttons/defconfig b/configs/stm3210e-eval/buttons/defconfig index ac3f108874..37b1cf968c 100644 --- a/configs/stm3210e-eval/buttons/defconfig +++ b/configs/stm3210e-eval/buttons/defconfig @@ -176,7 +176,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/composite/defconfig b/configs/stm3210e-eval/composite/defconfig index 18c2164d36..fa485f4df5 100755 --- a/configs/stm3210e-eval/composite/defconfig +++ b/configs/stm3210e-eval/composite/defconfig @@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/nsh/defconfig b/configs/stm3210e-eval/nsh/defconfig index facfe105a1..1341c58916 100755 --- a/configs/stm3210e-eval/nsh/defconfig +++ b/configs/stm3210e-eval/nsh/defconfig @@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/nsh2/defconfig b/configs/stm3210e-eval/nsh2/defconfig index c30691cc98..0ce49deb5c 100644 --- a/configs/stm3210e-eval/nsh2/defconfig +++ b/configs/stm3210e-eval/nsh2/defconfig @@ -217,7 +217,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/nx/defconfig b/configs/stm3210e-eval/nx/defconfig index 0833e7a787..6569c9a652 100644 --- a/configs/stm3210e-eval/nx/defconfig +++ b/configs/stm3210e-eval/nx/defconfig @@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/nxconsole/defconfig b/configs/stm3210e-eval/nxconsole/defconfig index 637967efc5..070bcde42a 100644 --- a/configs/stm3210e-eval/nxconsole/defconfig +++ b/configs/stm3210e-eval/nxconsole/defconfig @@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/nxlines/defconfig b/configs/stm3210e-eval/nxlines/defconfig index 0a124407af..8517f45e52 100644 --- a/configs/stm3210e-eval/nxlines/defconfig +++ b/configs/stm3210e-eval/nxlines/defconfig @@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/nxtext/defconfig b/configs/stm3210e-eval/nxtext/defconfig index 14e20946e4..d554a0a7a9 100644 --- a/configs/stm3210e-eval/nxtext/defconfig +++ b/configs/stm3210e-eval/nxtext/defconfig @@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/ostest/defconfig b/configs/stm3210e-eval/ostest/defconfig index 8585235ec4..abb4b925ca 100755 --- a/configs/stm3210e-eval/ostest/defconfig +++ b/configs/stm3210e-eval/ostest/defconfig @@ -186,7 +186,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/pm/defconfig b/configs/stm3210e-eval/pm/defconfig index f7ae420e4f..00d307c64c 100644 --- a/configs/stm3210e-eval/pm/defconfig +++ b/configs/stm3210e-eval/pm/defconfig @@ -227,7 +227,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/usbserial/defconfig b/configs/stm3210e-eval/usbserial/defconfig index ac3ff1c9a3..0672be24d9 100755 --- a/configs/stm3210e-eval/usbserial/defconfig +++ b/configs/stm3210e-eval/usbserial/defconfig @@ -175,7 +175,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3210e-eval/usbstorage/defconfig b/configs/stm3210e-eval/usbstorage/defconfig index 160d952370..57facca011 100755 --- a/configs/stm3210e-eval/usbstorage/defconfig +++ b/configs/stm3210e-eval/usbstorage/defconfig @@ -174,7 +174,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3220g-eval/dhcpd/defconfig b/configs/stm3220g-eval/dhcpd/defconfig index 762607bd05..39f2427fd7 100644 --- a/configs/stm3220g-eval/dhcpd/defconfig +++ b/configs/stm3220g-eval/dhcpd/defconfig @@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3220g-eval/nettest/defconfig b/configs/stm3220g-eval/nettest/defconfig index 9262e8c24e..a186ad67ce 100644 --- a/configs/stm3220g-eval/nettest/defconfig +++ b/configs/stm3220g-eval/nettest/defconfig @@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3220g-eval/nsh/defconfig b/configs/stm3220g-eval/nsh/defconfig index ca1d914de2..92741b91fb 100644 --- a/configs/stm3220g-eval/nsh/defconfig +++ b/configs/stm3220g-eval/nsh/defconfig @@ -251,7 +251,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3220g-eval/nsh2/defconfig b/configs/stm3220g-eval/nsh2/defconfig index 324c920d72..98b8b1923e 100644 --- a/configs/stm3220g-eval/nsh2/defconfig +++ b/configs/stm3220g-eval/nsh2/defconfig @@ -251,7 +251,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3220g-eval/nxwm/defconfig b/configs/stm3220g-eval/nxwm/defconfig index 41f365257e..32d9c31ebb 100644 --- a/configs/stm3220g-eval/nxwm/defconfig +++ b/configs/stm3220g-eval/nxwm/defconfig @@ -251,7 +251,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3220g-eval/ostest/defconfig b/configs/stm3220g-eval/ostest/defconfig index b8663a72a9..2f69fdc24b 100644 --- a/configs/stm3220g-eval/ostest/defconfig +++ b/configs/stm3220g-eval/ostest/defconfig @@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3220g-eval/telnetd/defconfig b/configs/stm3220g-eval/telnetd/defconfig index 28670bb476..c41c370881 100644 --- a/configs/stm3220g-eval/telnetd/defconfig +++ b/configs/stm3220g-eval/telnetd/defconfig @@ -228,7 +228,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/dhcpd/defconfig b/configs/stm3240g-eval/dhcpd/defconfig index e33b62f871..dd0342d70b 100644 --- a/configs/stm3240g-eval/dhcpd/defconfig +++ b/configs/stm3240g-eval/dhcpd/defconfig @@ -234,7 +234,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/discover/defconfig b/configs/stm3240g-eval/discover/defconfig index 7c1163b9b4..d7165573c9 100644 --- a/configs/stm3240g-eval/discover/defconfig +++ b/configs/stm3240g-eval/discover/defconfig @@ -472,7 +472,6 @@ CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/stm3240g-eval/nettest/defconfig b/configs/stm3240g-eval/nettest/defconfig index 813912b848..5c5053dda8 100644 --- a/configs/stm3240g-eval/nettest/defconfig +++ b/configs/stm3240g-eval/nettest/defconfig @@ -234,7 +234,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/nsh/defconfig b/configs/stm3240g-eval/nsh/defconfig index 8c7c290782..1501e32d1b 100644 --- a/configs/stm3240g-eval/nsh/defconfig +++ b/configs/stm3240g-eval/nsh/defconfig @@ -256,7 +256,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/nsh2/defconfig b/configs/stm3240g-eval/nsh2/defconfig index 53b0896d81..4e5eff8bd8 100644 --- a/configs/stm3240g-eval/nsh2/defconfig +++ b/configs/stm3240g-eval/nsh2/defconfig @@ -258,7 +258,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/nxconsole/defconfig b/configs/stm3240g-eval/nxconsole/defconfig index f87acc69e4..5eada6ab2b 100644 --- a/configs/stm3240g-eval/nxconsole/defconfig +++ b/configs/stm3240g-eval/nxconsole/defconfig @@ -257,7 +257,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/nxwm/defconfig b/configs/stm3240g-eval/nxwm/defconfig index d1fa395ddb..39ffcd07d3 100644 --- a/configs/stm3240g-eval/nxwm/defconfig +++ b/configs/stm3240g-eval/nxwm/defconfig @@ -257,7 +257,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/ostest/defconfig b/configs/stm3240g-eval/ostest/defconfig index cc7a9ac58b..3c29fca51c 100644 --- a/configs/stm3240g-eval/ostest/defconfig +++ b/configs/stm3240g-eval/ostest/defconfig @@ -233,7 +233,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/telnetd/defconfig b/configs/stm3240g-eval/telnetd/defconfig index 4ab86aeb99..8d5b449744 100644 --- a/configs/stm3240g-eval/telnetd/defconfig +++ b/configs/stm3240g-eval/telnetd/defconfig @@ -234,7 +234,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/webserver/defconfig b/configs/stm3240g-eval/webserver/defconfig index 8921d503ce..1ea4cf9438 100644 --- a/configs/stm3240g-eval/webserver/defconfig +++ b/configs/stm3240g-eval/webserver/defconfig @@ -257,7 +257,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm3240g-eval/xmlrpc/defconfig b/configs/stm3240g-eval/xmlrpc/defconfig index 20639dac42..308203e273 100644 --- a/configs/stm3240g-eval/xmlrpc/defconfig +++ b/configs/stm3240g-eval/xmlrpc/defconfig @@ -465,7 +465,6 @@ CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/stm32f4discovery/elf/defconfig b/configs/stm32f4discovery/elf/defconfig index 6d72e4a9ee..5bbef5e73a 100644 --- a/configs/stm32f4discovery/elf/defconfig +++ b/configs/stm32f4discovery/elf/defconfig @@ -397,7 +397,6 @@ CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 CONFIG_LIB_HOMEDIR="/" -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/stm32f4discovery/nsh/defconfig b/configs/stm32f4discovery/nsh/defconfig index c216c5997c..4461c08ce2 100644 --- a/configs/stm32f4discovery/nsh/defconfig +++ b/configs/stm32f4discovery/nsh/defconfig @@ -239,7 +239,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm32f4discovery/nxlines/defconfig b/configs/stm32f4discovery/nxlines/defconfig index e1e4f21316..737b015b1f 100644 --- a/configs/stm32f4discovery/nxlines/defconfig +++ b/configs/stm32f4discovery/nxlines/defconfig @@ -239,7 +239,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/stm32f4discovery/ostest/defconfig b/configs/stm32f4discovery/ostest/defconfig index 1683657303..ccd9c648aa 100644 --- a/configs/stm32f4discovery/ostest/defconfig +++ b/configs/stm32f4discovery/ostest/defconfig @@ -387,7 +387,6 @@ CONFIG_SYMTAB_ORDEREDBYNAME=y CONFIG_STDIO_BUFFER_SIZE=256 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 -# CONFIG_HAVE_LIBM is not set # CONFIG_NOPRINTF_FIELDWIDTH is not set # CONFIG_LIBC_FLOATINGPOINT is not set # CONFIG_EOL_IS_CR is not set diff --git a/configs/stm32f4discovery/pm/defconfig b/configs/stm32f4discovery/pm/defconfig index 07a99c764d..6785ec46ed 100644 --- a/configs/stm32f4discovery/pm/defconfig +++ b/configs/stm32f4discovery/pm/defconfig @@ -240,7 +240,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/sure-pic32mx/nsh/defconfig b/configs/sure-pic32mx/nsh/defconfig index 8025f968c3..ae7b4b83e3 100644 --- a/configs/sure-pic32mx/nsh/defconfig +++ b/configs/sure-pic32mx/nsh/defconfig @@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/sure-pic32mx/ostest/defconfig b/configs/sure-pic32mx/ostest/defconfig index f3c3fee36b..95c0448510 100644 --- a/configs/sure-pic32mx/ostest/defconfig +++ b/configs/sure-pic32mx/ostest/defconfig @@ -156,7 +156,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/sure-pic32mx/usbnsh/defconfig b/configs/sure-pic32mx/usbnsh/defconfig index cdebb2953b..cfdc83d4be 100644 --- a/configs/sure-pic32mx/usbnsh/defconfig +++ b/configs/sure-pic32mx/usbnsh/defconfig @@ -162,7 +162,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/teensy/hello/defconfig b/configs/teensy/hello/defconfig index 83176f57e9..05349bf473 100644 --- a/configs/teensy/hello/defconfig +++ b/configs/teensy/hello/defconfig @@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/teensy/nsh/defconfig b/configs/teensy/nsh/defconfig index 0908f02430..f8e71d7e94 100755 --- a/configs/teensy/nsh/defconfig +++ b/configs/teensy/nsh/defconfig @@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/teensy/usbstorage/defconfig b/configs/teensy/usbstorage/defconfig index 94cc301db3..08b8fd842e 100755 --- a/configs/teensy/usbstorage/defconfig +++ b/configs/teensy/usbstorage/defconfig @@ -105,7 +105,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/twr-k60n512/nsh/defconfig b/configs/twr-k60n512/nsh/defconfig index d8ccd6a6d3..d4b8f77fa8 100644 --- a/configs/twr-k60n512/nsh/defconfig +++ b/configs/twr-k60n512/nsh/defconfig @@ -171,7 +171,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/twr-k60n512/ostest/defconfig b/configs/twr-k60n512/ostest/defconfig index 8909add134..8505ac12d8 100644 --- a/configs/twr-k60n512/ostest/defconfig +++ b/configs/twr-k60n512/ostest/defconfig @@ -171,7 +171,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ubw32/nsh/defconfig b/configs/ubw32/nsh/defconfig index afa4e10c8a..a6fe0051d4 100644 --- a/configs/ubw32/nsh/defconfig +++ b/configs/ubw32/nsh/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/ubw32/ostest/defconfig b/configs/ubw32/ostest/defconfig index 0849fe800e..857684409e 100644 --- a/configs/ubw32/ostest/defconfig +++ b/configs/ubw32/ostest/defconfig @@ -155,7 +155,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=y CONFIG_MOTOROLA_SREC=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/us7032evb1/nsh/defconfig b/configs/us7032evb1/nsh/defconfig index 02d42aebe5..7dd5dc6983 100644 --- a/configs/us7032evb1/nsh/defconfig +++ b/configs/us7032evb1/nsh/defconfig @@ -95,7 +95,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=y CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/us7032evb1/ostest/defconfig b/configs/us7032evb1/ostest/defconfig index f92a55461e..286c619989 100644 --- a/configs/us7032evb1/ostest/defconfig +++ b/configs/us7032evb1/ostest/defconfig @@ -95,7 +95,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=y CONFIG_RAW_BINARY=y -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/vsn/nsh/defconfig b/configs/vsn/nsh/defconfig index 8c59b42981..a43deab6f1 100755 --- a/configs/vsn/nsh/defconfig +++ b/configs/vsn/nsh/defconfig @@ -214,7 +214,6 @@ CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_MOTOROLA_SREC=y CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/xtrs/nsh/defconfig b/configs/xtrs/nsh/defconfig index b8bd5d6f28..7065ad8d5c 100644 --- a/configs/xtrs/nsh/defconfig +++ b/configs/xtrs/nsh/defconfig @@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=256 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n CONFIG_LINKER_START_AREA=0x5200 CONFIG_LINKER_CODE_AREA=0x5300 diff --git a/configs/xtrs/ostest/defconfig b/configs/xtrs/ostest/defconfig index 9c88c5d8fb..5759b9105f 100644 --- a/configs/xtrs/ostest/defconfig +++ b/configs/xtrs/ostest/defconfig @@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=256 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n CONFIG_LINKER_START_AREA=0x5200 CONFIG_LINKER_CODE_AREA=0x5300 diff --git a/configs/xtrs/pashello/defconfig b/configs/xtrs/pashello/defconfig index d187ccec58..0d80ec0741 100644 --- a/configs/xtrs/pashello/defconfig +++ b/configs/xtrs/pashello/defconfig @@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=256 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n CONFIG_LINKER_START_AREA=0x5200 CONFIG_LINKER_CODE_AREA=0x5300 diff --git a/configs/z16f2800100zcog/ostest/defconfig b/configs/z16f2800100zcog/ostest/defconfig index 24cca2a6aa..0bfb09ea81 100644 --- a/configs/z16f2800100zcog/ostest/defconfig +++ b/configs/z16f2800100zcog/ostest/defconfig @@ -73,7 +73,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/z16f2800100zcog/pashello/defconfig b/configs/z16f2800100zcog/pashello/defconfig index daf98c7d6e..1c2fb80f20 100644 --- a/configs/z16f2800100zcog/pashello/defconfig +++ b/configs/z16f2800100zcog/pashello/defconfig @@ -73,7 +73,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/z80sim/nsh/defconfig b/configs/z80sim/nsh/defconfig index 87195b6e86..5dd0cdc4b3 100644 --- a/configs/z80sim/nsh/defconfig +++ b/configs/z80sim/nsh/defconfig @@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=64 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/z80sim/ostest/defconfig b/configs/z80sim/ostest/defconfig index 4fbca2e16a..9fa525259e 100644 --- a/configs/z80sim/ostest/defconfig +++ b/configs/z80sim/ostest/defconfig @@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/z80sim/pashello/defconfig b/configs/z80sim/pashello/defconfig index 1c50f71ff0..db32f93fb8 100644 --- a/configs/z80sim/pashello/defconfig +++ b/configs/z80sim/pashello/defconfig @@ -55,7 +55,6 @@ CONFIG_UART_TXBUFSIZE=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/z8encore000zco/ostest/defconfig b/configs/z8encore000zco/ostest/defconfig index 2fb427105f..35ed60abad 100644 --- a/configs/z8encore000zco/ostest/defconfig +++ b/configs/z8encore000zco/ostest/defconfig @@ -71,7 +71,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/configs/z8f64200100kit/ostest/defconfig b/configs/z8f64200100kit/ostest/defconfig index d9c5a51a5b..3384346986 100644 --- a/configs/z8f64200100kit/ostest/defconfig +++ b/configs/z8f64200100kit/ostest/defconfig @@ -71,7 +71,6 @@ CONFIG_UART1_2STOP=0 CONFIG_RRLOAD_BINARY=n CONFIG_INTELHEX_BINARY=n CONFIG_RAW_BINARY=n -CONFIG_HAVE_LIBM=n # # General OS setup diff --git a/lib/Kconfig b/lib/Kconfig index ddd5e2dde5..77cf626656 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -30,12 +30,27 @@ config LIB_HOMEDIR ---help--- The home directory to use with operations like such as 'cd ~' -config HAVE_LIBM - bool "Architecture-specific libm.a" +config LIBM + bool "Math library" default n + depends on !ARCH_MATH_H ---help--- - Architecture specific logic provides an implementation of libm.a - and a math.h header file that can be found at include/arch/math.h. + By default, no math library will be provided by NuttX. In this this case, it + is assumed that (1) no math library is required, or (2) you will be using the + math.h header file and the libm library provided by your toolchain. + + This is may be a very good choice is possible because your toolchain may have + have a highly optimized version of libm. + + Another possibility is that you have a custom, architecture-specific math + libary and that the corresponding math.h file resides at arch//include/math.h. + The option is selected via ARCH_MATH_H. If ARCH_MATH_H is selected,then the include/nuttx/math.h + header file will be copied to include/math.h where it can be used by your applications. + + If ARCH_MATH_H is not defined, then this option can be selected to build a generic, + math library built into NuttX. This math library comes from the Rhombus OS and + was written by Nick Johnson. The Rhombus OS math library port was contributed by + Darcy Gong. config NOPRINTF_FIELDWIDTH bool "Disable sprintf support fieldwidth" diff --git a/lib/Makefile b/lib/Makefile index fc8f0c4dda..5c62967ce8 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -50,7 +50,7 @@ include pthread/Make.defs include semaphore/Make.defs include signal/Make.defs include mqueue/Make.defs -include math/Make.defs +include fixedmath/Make.defs include net/Make.defs include time/Make.defs include libgen/Make.defs diff --git a/lib/README.txt b/lib/README.txt index 63d1c343c0..e99304841b 100644 --- a/lib/README.txt +++ b/lib/README.txt @@ -26,7 +26,8 @@ in the include/ directory provides the prototype for library functions. So we have: libgen - libgen.h - math - math.h and fixedmath.h + fixedmath - fixedmath.h + math - math.h mqueue - pthread.h net - Various network-related header files: netinet/ether.h, arpa/inet.h pthread - pthread.h diff --git a/lib/fixedmath/Make.defs b/lib/fixedmath/Make.defs new file mode 100644 index 0000000000..578e330153 --- /dev/null +++ b/lib/fixedmath/Make.defs @@ -0,0 +1,43 @@ +############################################################################ +# lib/fixedmath/Make.defs +# +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +# Add the fixed precision math C files to the build + +CSRCS += lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c lib_b16atan2.c + +# Add the fixed precision math directory to the build + +DEPPATH += --dep-path fixedmath +VPATH += :fixedmath diff --git a/lib/math/lib_b16atan2.c b/lib/fixedmath/lib_b16atan2.c similarity index 99% rename from lib/math/lib_b16atan2.c rename to lib/fixedmath/lib_b16atan2.c index 8792fa0879..69d132f80f 100644 --- a/lib/math/lib_b16atan2.c +++ b/lib/fixedmath/lib_b16atan2.c @@ -1,5 +1,5 @@ /**************************************************************************** - * lib/math/lib_b16atan2.c + * lib/fixedmath/lib_b16atan2.c * * Copyright (C) 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/lib/math/lib_b16cos.c b/lib/fixedmath/lib_b16cos.c similarity index 98% rename from lib/math/lib_b16cos.c rename to lib/fixedmath/lib_b16cos.c index 7547871f63..3e9229029e 100644 --- a/lib/math/lib_b16cos.c +++ b/lib/fixedmath/lib_b16cos.c @@ -1,5 +1,5 @@ /**************************************************************************** - * lib/math/lib_b16cos.c + * lib/fixedmath/lib_b16cos.c * * Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/lib/math/lib_b16sin.c b/lib/fixedmath/lib_b16sin.c similarity index 99% rename from lib/math/lib_b16sin.c rename to lib/fixedmath/lib_b16sin.c index 1eee179934..491b0ec782 100644 --- a/lib/math/lib_b16sin.c +++ b/lib/fixedmath/lib_b16sin.c @@ -1,5 +1,5 @@ /**************************************************************************** - * lib/math/lib_b16sin.c + * lib/fixedmath/lib_b16sin.c * * Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/lib/math/lib_fixedmath.c b/lib/fixedmath/lib_fixedmath.c similarity index 100% rename from lib/math/lib_fixedmath.c rename to lib/fixedmath/lib_fixedmath.c diff --git a/lib/math/lib_rint.c b/lib/fixedmath/lib_rint.c similarity index 99% rename from lib/math/lib_rint.c rename to lib/fixedmath/lib_rint.c index bd861ecedc..3a6407b8c0 100644 --- a/lib/math/lib_rint.c +++ b/lib/fixedmath/lib_rint.c @@ -1,5 +1,5 @@ /************************************************************ - * lib/math/lib_rint.c + * lib/fixedmath/lib_rint.c * * Copyright (C) 2007, 2011 Gregory Nutt. All rights reserved. * Author: Gregory Nutt diff --git a/lib/math/Kconfig b/lib/math/Kconfig new file mode 100644 index 0000000000..ae2bf31307 --- /dev/null +++ b/lib/math/Kconfig @@ -0,0 +1,4 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# diff --git a/lib/math/Make.defs b/lib/math/Make.defs index 126cd2f471..f656e1a735 100644 --- a/lib/math/Make.defs +++ b/lib/math/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # lib/math/Make.defs # -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -33,11 +33,17 @@ # ############################################################################ -# Add the math C files to the build +if ($(CONFIG_LIBM),y) -CSRCS += lib_rint.c lib_fixedmath.c lib_b16sin.c lib_b16cos.c lib_b16atan2.c +# Add the floating point math C files to the build -# Add the math directory to the build +CSRCS += lib_acos.c lib_asin.c lib_atan.c lib_atan2.c lib_ceil.c lib_cos.c +CSRCS += lib_cosh.c lib_exp.c lib_fabs.c lib_floor.c lib_fmod.c lib_frexp.c +CRRCS += lib_ldexp.c lib_log.c lib_log10.c lib_log2.c lib_modf.c lib_pow.c +CSRCS += lib_sin.c lib_sinh.c lib_sqrt.c lib_tan.c lib_tanh.c + +# Add the floating point math directory to the build DEPPATH += --dep-path math VPATH += :math +endif diff --git a/lib/math/Makefile b/lib/math/Makefile new file mode 100644 index 0000000000..56be0f0abd --- /dev/null +++ b/lib/math/Makefile @@ -0,0 +1,100 @@ +############################################################################ +# nuttx/lib/math/Makefile +# +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +# NSH Library + +ASRCS = +CSRCS = + +ifeq ($(CONFIG_MATHEXT_LIBRARY),y) +CSRCS += m_cos.c m_log2.c m_fmod.c m_sin.c m_fabs.c m_exp.c m_asin.c m_tan.c \ + m_modf.c m_ldexp.c m_acos.c m_frexp.c m_atan.c m_log.c m_tanh.c m_ceil.c \ + m_sinh.c m_sqrt.c m_pow.c m_cosh.c m_floor.c m_atan2.c m_log10.c +endif + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(WINTOOL),y) + BIN = "${shell cygpath -w $(APPDIR)/libapps$(LIBEXT)}" +else + BIN = "$(APPDIR)/libapps$(LIBEXT)" +endif + +ROOTDEPPATH = --dep-path . +VPATH = + +# Build targets + +all: .built +.PHONY: context .depend depend clean distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + @( for obj in $(OBJS) ; do \ + $(call ARCHIVE, $(BIN), $${obj}); \ + done ; ) + @touch .built + +context: + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) \ + $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + @rm -f *.o *~ .*.swp .built + $(call CLEAN) + +distclean: clean + @rm -f Make.dep .depend + +-include Make.dep + diff --git a/lib/math/lib_acos.c b/lib/math/lib_acos.c new file mode 100644 index 0000000000..83650d132a --- /dev/null +++ b/lib/math/lib_acos.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float acosf(float x) { + return (M_PI_2 - asinf(x)); +} + +double acos(double x) { + return (M_PI_2 - asin(x)); +} + +long double acosl(long double x) { + return (M_PI_2 - asinl(x)); +} diff --git a/lib/math/lib_asin.c b/lib/math/lib_asin.c new file mode 100644 index 0000000000..9d72e8042d --- /dev/null +++ b/lib/math/lib_asin.c @@ -0,0 +1,88 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float asinf(float x) { + long double y, y_sin, y_cos; + + y = 0; + + while (1) { + y_sin = sinf(y); + y_cos = cosf(y); + + if (y > M_PI_2 || y < -M_PI_2) { + y = fmodf(y, M_PI); + } + + if (y_sin + DBL_EPSILON >= x && y_sin - DBL_EPSILON <= x) { + break; + } + + y = y - (y_sin - x) / y_cos; + } + + return y; +} + +double asin(double x) { + long double y, y_sin, y_cos; + + y = 0; + + while (1) { + y_sin = sin(y); + y_cos = cos(y); + + if (y > M_PI_2 || y < -M_PI_2) { + y = fmod(y, M_PI); + } + + if (y_sin + DBL_EPSILON >= x && y_sin - DBL_EPSILON <= x) { + break; + } + + y = y - (y_sin - x) / y_cos; + } + + return y; +} + +long double asinl(long double x) { + long double y, y_sin, y_cos; + + y = 0; + + while (1) { + y_sin = sinl(y); + y_cos = cosl(y); + + if (y > M_PI_2 || y < -M_PI_2) { + y = fmodl(y, M_PI); + } + + if (y_sin + LDBL_EPSILON >= x && y_sin - LDBL_EPSILON <= x) { + break; + } + + y = y - (y_sin - x) / y_cos; + } + + return y; +} + diff --git a/lib/math/lib_atan.c b/lib/math/lib_atan.c new file mode 100644 index 0000000000..e909e5a8e3 --- /dev/null +++ b/lib/math/lib_atan.c @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +float atanf(float x) { + return asinf(x / sqrtf(x * x + 1)); +} + +double atan(double x) { + return asin(x / sqrt(x * x + 1)); +} + +long double atanl(long double x) { + return asinl(x / sqrtl(x * x + 1)); +} diff --git a/lib/math/lib_atan2.c b/lib/math/lib_atan2.c new file mode 100644 index 0000000000..b4ded0c168 --- /dev/null +++ b/lib/math/lib_atan2.c @@ -0,0 +1,120 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float atan2f(float y, float x) { + + if (y == 0.0) { + if (x >= 0.0) { + return 0.0; + } + else { + return M_PI; + } + } + else if (y > 0.0) { + if (x == 0.0) { + return M_PI_2; + } + else if (x > 0.0) { + return atanf(y / x); + } + else { + return M_PI - atanf(y / x); + } + } + else { + if (x == 0.0) { + return M_PI + M_PI_2; + } + else if (x > 0.0) { + return 2 * M_PI - atanf(y / x); + } + else { + return M_PI + atanf(y / x); + } + } +} + +double atan2(double y, double x) { + + if (y == 0.0) { + if (x >= 0.0) { + return 0.0; + } + else { + return M_PI; + } + } + else if (y > 0.0) { + if (x == 0.0) { + return M_PI_2; + } + else if (x > 0.0) { + return atan(y / x); + } + else { + return M_PI - atan(y / x); + } + } + else { + if (x == 0.0) { + return M_PI + M_PI_2; + } + else if (x > 0.0) { + return 2 * M_PI - atan(y / x); + } + else { + return M_PI + atan(y / x); + } + } +} + +long double atan2l(long double y, long double x) { + + if (y == 0.0) { + if (x >= 0.0) { + return 0.0; + } + else { + return M_PI; + } + } + else if (y > 0.0) { + if (x == 0.0) { + return M_PI_2; + } + else if (x > 0.0) { + return atanl(y / x); + } + else { + return M_PI - atanl(y / x); + } + } + else { + if (x == 0.0) { + return M_PI + M_PI_2; + } + else if (x > 0.0) { + return 2 * M_PI - atanl(y / x); + } + else { + return M_PI + atanl(y / x); + } + } +} diff --git a/lib/math/lib_ceil.c b/lib/math/lib_ceil.c new file mode 100644 index 0000000000..c2447c0b85 --- /dev/null +++ b/lib/math/lib_ceil.c @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float ceilf(float x) { + modff(x, &x); + if (x > 0.0) x += 1.0; + return x; +} + +double ceil(double x) { + modf(x, &x); + if (x > 0.0) x += 1.0; + return x; +} + +long double ceill(long double x) { + modfl(x, &x); + if (x > 0.0) x += 1.0; + return x; +} + diff --git a/lib/math/lib_cos.c b/lib/math/lib_cos.c new file mode 100644 index 0000000000..f8732b041a --- /dev/null +++ b/lib/math/lib_cos.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include + +float cosf(float x) { + return sinf(x + M_PI_2); +} + +double cos(double x) { + return sin(x + M_PI_2); +} + +long double cosl(long double x) { + return sinl(x + M_PI_2); +} diff --git a/lib/math/lib_cosh.c b/lib/math/lib_cosh.c new file mode 100644 index 0000000000..1069903112 --- /dev/null +++ b/lib/math/lib_cosh.c @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float coshf(float x) { + x = expf(x); + return ((x + (1.0 / x)) / 2.0); +} + +double cosh(double x) { + x = exp(x); + return ((x + (1.0 / x)) / 2.0); +} + +long double coshl(long double x) { + x = expl(x); + return ((x + (1.0 / x)) / 2.0); +} diff --git a/lib/math/lib_exp.c b/lib/math/lib_exp.c new file mode 100644 index 0000000000..a70cb10e7c --- /dev/null +++ b/lib/math/lib_exp.c @@ -0,0 +1,253 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include +#include + +#define M_E2 (M_E * M_E) +#define M_E4 (M_E2 * M_E2) +#define M_E8 (M_E4 * M_E4) +#define M_E16 (M_E8 * M_E8) +#define M_E32 (M_E16 * M_E16) +#define M_E64 (M_E32 * M_E32) +#define M_E128 (M_E64 * M_E64) +#define M_E256 (M_E128 * M_E128) +#define M_E512 (M_E256 * M_E256) +#define M_E1024 (M_E512 * M_E512) + +static double _expi_square_tbl[11] = { + M_E, // e^1 + M_E2, // e^2 + M_E4, // e^4 + M_E8, // e^8 + M_E16, // e^16 + M_E32, // e^32 + M_E64, // e^64 + M_E128, // e^128 + M_E256, // e^256 + M_E512, // e^512 + M_E1024, // e^1024 +}; + +static double _expi(size_t n) { + size_t i; + double val; + + if (n > 1024) { + return INFINITY; + } + + val = 1.0; + + for (i = 0; n; i++) { + if (n & (1 << i)) { + n &= ~(1 << i); + val *= _expi_square_tbl[i]; + } + } + + return val; +} + +static float _flt_inv_fact[] = { + 1.0 / 1.0, // 1/0! + 1.0 / 1.0, // 1/1! + 1.0 / 2.0, // 1/2! + 1.0 / 6.0, // 1/3! + 1.0 / 24.0, // 1/4! + 1.0 / 120.0, // 1/5! + 1.0 / 720.0, // 1/6! + 1.0 / 5040.0, // 1/7! + 1.0 / 40320.0, // 1/8! + 1.0 / 362880.0, // 1/9! + 1.0 / 3628800.0, // 1/10! +}; + +float expf(float x) { + size_t int_part; + bool invert; + float value; + float x0; + size_t i; + + if (x == 0) { + return 1; + } + else if (x < 0) { + invert = true; + x = -x; + } + else { + invert = false; + } + + /* extract integer component */ + int_part = (size_t) x; + + /* set x to fractional component */ + x -= (float) int_part; + + /* perform Taylor series approximation with eleven terms */ + value = 0.0; + x0 = 1.0; + for (i = 0; i < 10; i++) { + value += x0 * _flt_inv_fact[i]; + x0 *= x; + } + + /* multiply by exp of the integer component */ + value *= _expi(int_part); + + if (invert) { + return (1.0 / value); + } + else { + return value; + } +} + +static double _dbl_inv_fact[] = { + 1.0 / 1.0, // 1 / 0! + 1.0 / 1.0, // 1 / 1! + 1.0 / 2.0, // 1 / 2! + 1.0 / 6.0, // 1 / 3! + 1.0 / 24.0, // 1 / 4! + 1.0 / 120.0, // 1 / 5! + 1.0 / 720.0, // 1 / 6! + 1.0 / 5040.0, // 1 / 7! + 1.0 / 40320.0, // 1 / 8! + 1.0 / 362880.0, // 1 / 9! + 1.0 / 3628800.0, // 1 / 10! + 1.0 / 39916800.0, // 1 / 11! + 1.0 / 479001600.0, // 1 / 12! + 1.0 / 6227020800.0, // 1 / 13! + 1.0 / 87178291200.0, // 1 / 14! + 1.0 / 1307674368000.0, // 1 / 15! + 1.0 / 20922789888000.0, // 1 / 16! + 1.0 / 355687428096000.0, // 1 / 17! + 1.0 / 6402373705728000.0, // 1 / 18! +}; + +double exp(double x) { + size_t int_part; + bool invert; + double value; + double x0; + size_t i; + + if (x == 0) { + return 1; + } + else if (x < 0) { + invert = true; + x = -x; + } + else { + invert = false; + } + + /* extract integer component */ + int_part = (size_t) x; + + /* set x to fractional component */ + x -= (double) int_part; + + /* perform Taylor series approximation with nineteen terms */ + value = 0.0; + x0 = 1.0; + for (i = 0; i < 19; i++) { + value += x0 * _dbl_inv_fact[i]; + x0 *= x; + } + + /* multiply by exp of the integer component */ + value *= _expi(int_part); + + if (invert) { + return (1.0 / value); + } + else { + return value; + } +} + +static long double _ldbl_inv_fact[] = { + 1.0 / 1.0, // 1 / 0! + 1.0 / 1.0, // 1 / 1! + 1.0 / 2.0, // 1 / 2! + 1.0 / 6.0, // 1 / 3! + 1.0 / 24.0, // 1 / 4! + 1.0 / 120.0, // 1 / 5! + 1.0 / 720.0, // 1 / 6! + 1.0 / 5040.0, // 1 / 7! + 1.0 / 40320.0, // 1 / 8! + 1.0 / 362880.0, // 1 / 9! + 1.0 / 3628800.0, // 1 / 10! + 1.0 / 39916800.0, // 1 / 11! + 1.0 / 479001600.0, // 1 / 12! + 1.0 / 6227020800.0, // 1 / 13! + 1.0 / 87178291200.0, // 1 / 14! + 1.0 / 1307674368000.0, // 1 / 15! + 1.0 / 20922789888000.0, // 1 / 16! + 1.0 / 355687428096000.0, // 1 / 17! + 1.0 / 6402373705728000.0, // 1 / 18! +}; + +long double expl(long double x) { + size_t int_part; + bool invert; + long double value; + long double x0; + size_t i; + + if (x == 0) { + return 1; + } + else if (x < 0) { + invert = true; + x = -x; + } + else { + invert = false; + } + + /* extract integer component */ + int_part = (size_t) x; + + /* set x to fractional component */ + x -= (long double) int_part; + + /* perform Taylor series approximation with nineteen terms */ + value = 0.0; + x0 = 1.0; + for (i = 0; i < 19; i++) { + value += x0 * _ldbl_inv_fact[i]; + x0 *= x; + } + + /* multiply by exp of the integer component */ + value *= _expi(int_part); + + if (invert) { + return (1.0 / value); + } + else { + return value; + } +} diff --git a/lib/math/lib_fabs.c b/lib/math/lib_fabs.c new file mode 100644 index 0000000000..f479aa123d --- /dev/null +++ b/lib/math/lib_fabs.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float fabsf(float x) { + return ((x < 0) ? -x : x); +} + +double fabs(double x) { + return ((x < 0) ? -x : x); +} + +long double fabsl(long double x) { + return ((x < 0) ? -x : x); +} diff --git a/lib/math/lib_floor.c b/lib/math/lib_floor.c new file mode 100644 index 0000000000..a6979ac8a1 --- /dev/null +++ b/lib/math/lib_floor.c @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float floorf(float x) { + modff(x, &x); + if (x < 0.0) x -= 1.0; + return x; +} + +double floor(double x) { + modf(x, &x); + if (x < 0.0) x -= 1.0; + return x; +} + +long double floorl(long double x) { + modfl(x, &x); + if (x < 0.0) x -= 1.0; + return x; +} + diff --git a/lib/math/lib_fmod.c b/lib/math/lib_fmod.c new file mode 100644 index 0000000000..532fa33608 --- /dev/null +++ b/lib/math/lib_fmod.c @@ -0,0 +1,67 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +/* If GCC/CLang builtins are available, use them */ +#ifdef __GNUC__ + +float fmodf(float x, float div) { + return __builtin_fmodf(x, div); +} + +double fmod(double x, double div) { + return __builtin_fmod(x, div); +} + +long double fmodl(long double x, long double div) { + return __builtin_fmodl(x, div); +} + +#else + +float fmodf(float x, float div) { + float n0; + + x /= div; + x = modff(x, &n0); + x *= div; + + return x; +} + +double fmod(double x, double div) { + double n0; + + x /= div; + x = modf(x, &n0); + x *= div; + + return x; +} + +long double fmodl(long double x, long double div) { + long double n0; + + x /= div; + x = modfl(x, &n0); + x *= div; + + return x; +} + +#endif diff --git a/lib/math/lib_frexp.c b/lib/math/lib_frexp.c new file mode 100644 index 0000000000..102609dbe8 --- /dev/null +++ b/lib/math/lib_frexp.c @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float frexpf(float x, int *exp) { + *exp = (int) ceilf(log2f(x)); + return x / ldexpf(1.0, *exp); +} + +double frexp(double x, int *exp) { + *exp = (int) ceil(log2(x)); + return x / ldexp(1.0, *exp); +} + +long double frexpl(long double x, int *exp) { + *exp = (int) ceill(log2(x)); + return x / ldexpl(1.0, *exp); +} + diff --git a/lib/math/lib_ldexp.c b/lib/math/lib_ldexp.c new file mode 100644 index 0000000000..2ca79221a0 --- /dev/null +++ b/lib/math/lib_ldexp.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float ldexpf(float x, int n) { + return (x * powf(2.0, (float) n)); +} + +double ldexp(double x, int n) { + return (x * pow(2.0, (double) n)); +} + +long double ldexpl(long double x, int n) { + return (x * powl(2.0, (long double) n)); +} + diff --git a/lib/math/lib_log.c b/lib/math/lib_log.c new file mode 100644 index 0000000000..62af0368aa --- /dev/null +++ b/lib/math/lib_log.c @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float logf(float x) { + float y, y_old, ey, epsilon; + + y = 0.0; + y_old = 1.0; + epsilon = FLT_EPSILON; + + while (y > y_old + epsilon || y < y_old - epsilon) { + y_old = y; + ey = exp(y); + y -= (ey - x) / ey; + + if (y > 700.0) { + y = 700.0; + } + if (y < -700.0) { + y = -700.0; + } + + epsilon = (fabs(y) > 1.0) ? fabs(y) * FLT_EPSILON : FLT_EPSILON; + } + + if (y == 700.0) { + return INFINITY; + } + if (y == -700.0) { + return INFINITY; + } + + return y; +} + +double log(double x) { + double y, y_old, ey, epsilon; + + y = 0.0; + y_old = 1.0; + epsilon = DBL_EPSILON; + + while (y > y_old + epsilon || y < y_old - epsilon) { + y_old = y; + ey = exp(y); + y -= (ey - x) / ey; + + if (y > 700.0) { + y = 700.0; + } + if (y < -700.0) { + y = -700.0; + } + + epsilon = (fabs(y) > 1.0) ? fabs(y) * DBL_EPSILON : DBL_EPSILON; + } + + if (y == 700.0) { + return INFINITY; + } + if (y == -700.0) { + return INFINITY; + } + + return y; +} + +long double logl(long double x) { + long double y, y_old, ey, epsilon; + + y = 0.0; + y_old = 1.0; + epsilon = 1e-6; //fixme + + while (y > y_old + epsilon || y < y_old - epsilon) { + y_old = y; + ey = expl(y); + y -= (ey - x) / ey; + + if (y > 700.0) { + y = 700.0; + } + if (y < -700.0) { + y = -700.0; + } + } + + if (y == 700.0) { + return INFINITY; + } + if (y == -700.0) { + return INFINITY; + } + + return y; +} + diff --git a/lib/math/lib_log10.c b/lib/math/lib_log10.c new file mode 100644 index 0000000000..855480ad6c --- /dev/null +++ b/lib/math/lib_log10.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float log10f(float x) { + return (logf(x) / M_LN10); +} + +double log10(double x) { + return (log(x) / M_LN10); +} + +long double log10l(long double x) { + return (logl(x) / M_LN10); +} diff --git a/lib/math/lib_log2.c b/lib/math/lib_log2.c new file mode 100644 index 0000000000..f8eb541b20 --- /dev/null +++ b/lib/math/lib_log2.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float log2f(float x) { + return (logf(x) / M_LN2); +} + +double log2(double x) { + return (log(x) / M_LN2); +} + +long double log2l(long double x) { + return (logl(x) / M_LN2); +} diff --git a/lib/math/lib_modf.c b/lib/math/lib_modf.c new file mode 100644 index 0000000000..1e6fadc11b --- /dev/null +++ b/lib/math/lib_modf.c @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include + +float modff(float x, float *iptr) { + if (fabsf(x) >= 8388608.0) { + *iptr = x; + return 0.0; + } + else if (fabs(x) < 1.0) { + *iptr = 0.0; + return x; + } + else { + *iptr = (float) (int) x; + return (x - *iptr); + } +} + +double modf(double x, double *iptr) { + if (fabs(x) >= 4503599627370496.0) { + *iptr = x; + return 0.0; + } + else if (fabs(x) < 1.0) { + *iptr = 0.0; + return x; + } + else { + *iptr = (double) (int64_t) x; + return (x - *iptr); + } +} + +long double modfl(long double x, long double *iptr) { + if (fabs(x) >= 4503599627370496.0) { + *iptr = x; + return 0.0; + } + else if (fabs(x) < 1.0) { + *iptr = 0.0; + return x; + } + else { + *iptr = (long double) (int64_t) x; + return (x - *iptr); + } +} + diff --git a/lib/math/lib_pow.c b/lib/math/lib_pow.c new file mode 100644 index 0000000000..b353359eb2 --- /dev/null +++ b/lib/math/lib_pow.c @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float powf(float b, float e) { + return expf(e * logf(b)); +} + +double pow(double b, double e) { + return exp(e * log(b)); +} + +long double powl(long double b, long double e) { + return expl(e * logl(b)); +} diff --git a/lib/math/lib_sin.c b/lib/math/lib_sin.c new file mode 100644 index 0000000000..e862104fd6 --- /dev/null +++ b/lib/math/lib_sin.c @@ -0,0 +1,152 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +static float _flt_inv_fact[] = { + 1.0 / 1.0, // 1 / 1! + 1.0 / 6.0, // 1 / 3! + 1.0 / 120.0, // 1 / 5! + 1.0 / 5040.0, // 1 / 7! + 1.0 / 362880.0, // 1 / 9! + 1.0 / 39916800.0, // 1 / 11! +}; + +float sinf(float x) { + float x_squared; + float sin_x; + size_t i; + + /* move x to [-pi, pi) */ + x = fmodf(x, 2 * M_PI); + if (x >= M_PI) x -= 2 * M_PI; + if (x < -M_PI) x += 2 * M_PI; + + /* move x to [-pi/2, pi/2) */ + if (x >= M_PI_2) x = M_PI - x; + if (x < -M_PI_2) x = -M_PI - x; + + x_squared = x * x; + sin_x = 0.0; + + /* perform Taylor series approximation for sin(x) with six terms */ + for (i = 0; i < 6; i++) { + if (i % 2 == 0) { + sin_x += x * _flt_inv_fact[i]; + } + else { + sin_x -= x * _flt_inv_fact[i]; + } + + x *= x_squared; + } + + return sin_x; +} + +static double _dbl_inv_fact[] = { + 1.0 / 1.0, // 1 / 1! + 1.0 / 6.0, // 1 / 3! + 1.0 / 120.0, // 1 / 5! + 1.0 / 5040.0, // 1 / 7! + 1.0 / 362880.0, // 1 / 9! + 1.0 / 39916800.0, // 1 / 11! + 1.0 / 6227020800.0, // 1 / 13! + 1.0 / 1307674368000.0, // 1 / 15! + 1.0 / 355687428096000.0, // 1 / 17! + 1.0 / 121645100408832000.0, // 1 / 19! +}; + +double sin(double x) { + double x_squared; + double sin_x; + size_t i; + + /* move x to [-pi, pi) */ + x = fmod(x, 2 * M_PI); + if (x >= M_PI) x -= 2 * M_PI; + if (x < -M_PI) x += 2 * M_PI; + + /* move x to [-pi/2, pi/2) */ + if (x >= M_PI_2) x = M_PI - x; + if (x < -M_PI_2) x = -M_PI - x; + + x_squared = x * x; + sin_x = 0.0; + + /* perform Taylor series approximation for sin(x) with ten terms */ + for (i = 0; i < 10; i++) { + if (i % 2 == 0) { + sin_x += x * _dbl_inv_fact[i]; + } + else { + sin_x -= x * _dbl_inv_fact[i]; + } + + x *= x_squared; + } + + return sin_x; +} + +static long double _ldbl_inv_fact[] = { + 1.0 / 1.0, // 1 / 1! + 1.0 / 6.0, // 1 / 3! + 1.0 / 120.0, // 1 / 5! + 1.0 / 5040.0, // 1 / 7! + 1.0 / 362880.0, // 1 / 9! + 1.0 / 39916800.0, // 1 / 11! + 1.0 / 6227020800.0, // 1 / 13! + 1.0 / 1307674368000.0, // 1 / 15! + 1.0 / 355687428096000.0, // 1 / 17! + 1.0 / 121645100408832000.0, // 1 / 19! +}; + +long double sinl(long double x) { + long double x_squared; + long double sin_x; + size_t i; + + /* move x to [-pi, pi) */ + x = fmodl(x, 2 * M_PI); + if (x >= M_PI) x -= 2 * M_PI; + if (x < -M_PI) x += 2 * M_PI; + + /* move x to [-pi/2, pi/2) */ + if (x >= M_PI_2) x = M_PI - x; + if (x < -M_PI_2) x = -M_PI - x; + + x_squared = x * x; + sin_x = 0.0; + + /* perform Taylor series approximation for sin(x) with ten terms */ + for (i = 0; i < 10; i++) { + if (i % 2 == 0) { + sin_x += x * _ldbl_inv_fact[i]; + } + else { + sin_x -= x * _ldbl_inv_fact[i]; + } + + x *= x_squared; + } + + return sin_x; +} + diff --git a/lib/math/lib_sinh.c b/lib/math/lib_sinh.c new file mode 100644 index 0000000000..10276d821e --- /dev/null +++ b/lib/math/lib_sinh.c @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float sinhf(float x) { + x = expf(x); + return ((x - (1.0 / x)) / 2.0); +} + +double sinh(double x) { + x = exp(x); + return ((x - (1.0 / x)) / 2.0); +} + +long double sinhl(long double x) { + x = expl(x); + return ((x - (1.0 / x)) / 2.0); +} diff --git a/lib/math/lib_sqrt.c b/lib/math/lib_sqrt.c new file mode 100644 index 0000000000..206a7fe82a --- /dev/null +++ b/lib/math/lib_sqrt.c @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2009-2011 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include +#include + +static float __sqrt_approx(float x) { + int32_t i; + + // floats + bit manipulation = +inf fun! + i = *((int32_t*) &x); + i = 0x1FC00000 + (i >> 1); + x = *((float*) &i); + + return x; +} + +float sqrtf(float x) { + float y; + + // filter out invalid/trivial inputs + if (x < 0.0) { errno = EDOM; return NAN; } + if (isnan(x)) return NAN; + if (isinf(x)) return INFINITY; + if (x == 0.0) return 0.0; + + // guess square root (using bit manipulation) + y = __sqrt_approx(x); + + // perform three iterations of approximation + // this number (3) is definitely optimal + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + + return y; +} + +double sqrt(double x) { + long double y, y1; + + // filter out invalid/trivial inputs + if (x < 0.0) { errno = EDOM; return NAN; } + if (isnan(x)) return NAN; + if (isinf(x)) return INFINITY; + if (x == 0.0) return 0.0; + + // guess square root (using bit manipulation) + y = __sqrt_approx(x); + + // perform four iterations of approximation + // this number (4) is definitely optimal + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + + // if guess was terribe (out of range of float) + // repeat approximation until convergence + if (y * y < x - 1.0 || y * y > x + 1.0) { + y1 = -1.0; + while (y != y1) { + y1 = y; + y = 0.5 * (y + x / y); + } + } + + return y; +} + +long double sqrtl(long double x) { + long double y, y1; + + // filter out invalid/trivial inputs + if (x < 0.0) { errno = EDOM; return NAN; } + if (isnan(x)) return NAN; + if (isinf(x)) return INFINITY; + if (x == 0.0) return 0.0; + + // guess square root (using bit manipulation) + y = __sqrt_approx(x); + + // perform four iterations of approximation + // this number (4) is definitely optimal + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + y = 0.5 * (y + x / y); + + // if guess was terribe (out of range of float) + // repeat approximation until convergence + if (y * y < x - 1.0 || y * y > x + 1.0) { + y1 = -1.0; + while (y != y1) { + y1 = y; + y = 0.5 * (y + x / y); + } + } + + return y; +} diff --git a/lib/math/lib_tan.c b/lib/math/lib_tan.c new file mode 100644 index 0000000000..c336a6260d --- /dev/null +++ b/lib/math/lib_tan.c @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include +#include + +float tanf(float x) { + return (sinf(x) / cosf(x)); +} + +double tan(double x) { + return (sin(x) / cos(x)); +} + +long double tanl(long double x) { + return (sinl(x) / cosl(x)); +} diff --git a/lib/math/lib_tanh.c b/lib/math/lib_tanh.c new file mode 100644 index 0000000000..c6a1a1c875 --- /dev/null +++ b/lib/math/lib_tanh.c @@ -0,0 +1,39 @@ +/* + * Copyright (C) 2009, 2010 Nick Johnson + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#include +#include + +float tanhf(float x) { + float x0 = expf(x); + float x1 = 1.0 / x0; + + return ((x0 + x1) / (x0 - x1)); +} + +double tanh(double x) { + double x0 = exp(x); + double x1 = 1.0 / x0; + + return ((x0 + x1) / (x0 - x1)); +} + +long double tanhl(long double x) { + long double x0 = exp(x); + long double x1 = 1.0 / x0; + + return ((x0 + x1) / (x0 - x1)); +}