- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Are there any runtime errors defined for the ASIN function, other than the obvious domain error of ABS(A) > 1.0? I'm getting an underflow error when I perform ASIN(4.15e-5), which should be entirely valid as the result is only 2.38e-3 (well within the bounds of REAL*4). Input and output data types are both REAL*4.
Ссылка скопирована
3 Ответы
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Correction: Result is 4.15e-5, not 2.38e-3. Still well within the capabilities of single precision though.
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
Please report the problem with sufficient detail that will allow it to be reproduced, as recommended.
Here is a counter-example:
program xasin
implicit none
real :: x = 4.15e-5
!
print *,asin(x)
end program
Compiled using Ifort 19.1U3 on Windows, this program prints out:
4.1499999E-05
- Отметить как новое
- Закладка
- Подписаться
- Отключить
- Подписка на RSS-канал
- Выделить
- Печать
- Сообщить о недопустимом содержимом
If you build the program to not mask underflow exceptions (which is not the default) and prevent flush-to-zero, it should throw an exception. I can't remember what those flags are offhand (the latter is -no-ftz IIRC).
Ответить
Параметры темы
- Подписка на RSS-канал
- Отметить тему как новую
- Отметить тему как прочитанную
- Выполнить отслеживание данной Тема для текущего пользователя
- Закладка
- Подписаться
- Страница в формате печати