php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
php_math_round_mode.h File Reference
#include "php.h"

Go to the source code of this file.

Macros

#define PHP_ROUND_HALF_UP   0x01 /* Arithmetic rounding, up == away from zero */
 
#define PHP_ROUND_HALF_DOWN   0x02 /* Arithmetic rounding, down == towards zero */
 
#define PHP_ROUND_HALF_EVEN   0x03 /* Banker's rounding */
 
#define PHP_ROUND_HALF_ODD   0x04
 
#define PHP_ROUND_CEILING   0x05
 
#define PHP_ROUND_FLOOR   0x06
 
#define PHP_ROUND_TOWARD_ZERO   0x07
 
#define PHP_ROUND_AWAY_FROM_ZERO   0x08
 

Functions

PHPAPI int php_math_round_mode_from_enum (zend_object *mode)
 

Variables

PHPAPI zend_class_entryrounding_mode_ce
 

Macro Definition Documentation

◆ PHP_ROUND_AWAY_FROM_ZERO

#define PHP_ROUND_AWAY_FROM_ZERO   0x08

Definition at line 50 of file php_math_round_mode.h.

◆ PHP_ROUND_CEILING

#define PHP_ROUND_CEILING   0x05

Definition at line 38 of file php_math_round_mode.h.

◆ PHP_ROUND_FLOOR

#define PHP_ROUND_FLOOR   0x06

Definition at line 42 of file php_math_round_mode.h.

◆ PHP_ROUND_HALF_DOWN

#define PHP_ROUND_HALF_DOWN   0x02 /* Arithmetic rounding, down == towards zero */

Definition at line 26 of file php_math_round_mode.h.

◆ PHP_ROUND_HALF_EVEN

#define PHP_ROUND_HALF_EVEN   0x03 /* Banker's rounding */

Definition at line 30 of file php_math_round_mode.h.

◆ PHP_ROUND_HALF_ODD

#define PHP_ROUND_HALF_ODD   0x04

Definition at line 34 of file php_math_round_mode.h.

◆ PHP_ROUND_HALF_UP

#define PHP_ROUND_HALF_UP   0x01 /* Arithmetic rounding, up == away from zero */

Definition at line 22 of file php_math_round_mode.h.

◆ PHP_ROUND_TOWARD_ZERO

#define PHP_ROUND_TOWARD_ZERO   0x07

Definition at line 46 of file php_math_round_mode.h.

Function Documentation

◆ php_math_round_mode_from_enum()

PHPAPI int php_math_round_mode_from_enum ( zend_object * mode)

Definition at line 307 of file math.c.

Variable Documentation

◆ rounding_mode_ce

PHPAPI zend_class_entry* rounding_mode_ce
extern

Definition at line 297 of file basic_functions.c.