1 /* 2 * Copyright 2013, The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef _FENV_PORTABLE_H_ 18 #define _FENV_PORTABLE_H_ 19 20 #include <sys/types.h> 21 22 /* Exception flags. */ 23 #define FE_INVALID_PORTABLE 0x01 24 #define FE_DIVBYZERO_PORTABLE 0x02 25 #define FE_OVERFLOW_PORTABLE 0x04 26 #define FE_UNDERFLOW_PORTABLE 0x08 27 #define FE_INEXACT_PORTABLE 0x10 28 #define FE_ALL_EXCEPT_PORTABLE (FE_DIVBYZERO_PORTABLE | FE_INEXACT_PORTABLE | FE_INVALID_PORTABLE |\ 29 FE_OVERFLOW_PORTABLE | FE_UNDERFLOW_PORTABLE) 30 31 /* Rounding modes. */ 32 #define FE_TONEAREST_PORTABLE 0x0 33 #define FE_UPWARD_PORTABLE 0x1 34 #define FE_DOWNWARD_PORTABLE 0x2 35 #define FE_TOWARDZERO_PORTABLE 0x3 36 37 #endif /* _FENV_PORTABLE_H_ */ 38