ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
28 марта
717946 Топик полностью
SciFi (06.12.2016 17:52, просмотров: 61) ответил IBAH на А ИАР умеет? и откуда он знает что результат функции log10() не зависит от фаз луны
IAR не умеет. А у gcc имеется список функций, которые он может вычислить при компиляции. https://gcc.gnu.org/wiki/FloatingPointMath
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
While traditionally all mathematical functions would reside in an external library (such as libm), GCC may replace calls to certain functions by calls to built-in versions or may evaluate them at compile time (using MPFR) in some circumstances. Functions are only evaluated at compile time if the rounding mode is known to be round to even (-fno-rounding-math), or if the result is exact and does not depend on the rounding mode. Compile-time evaluation always rounds correctly, even for transcendental functions. However, as library functions may not be correctly rounded for all arguments, function results may differ depending on wether they are evaluated at compile time or at run time. Built-in functions have names such as __builtin_sqrt. What built-in functions are used by GCC depends on the mode. By default, built-in functions are only used when they provide the semantics guaranteed by the C99 standard. However, with -funsafe-math-optimizations, substituted functions may have less precision or be restricted to a smaller domain. Use the option -fno-builtin-somefun to avoid somefun to be replaced by a built-in version. The option -fno-builtin prevents all autmatic use of built-in functions, including non-mathematical ones.
ส็็็็็็็็็็็็็็็็็็็็็็็็็༼ ຈل͜ຈ༽ส้้้้้้้้้้้้้้้้้้้้้้้