rfc:gmp-floating-point
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:gmp-floating-point [2014/01/04 07:20] – typo pollita | rfc:gmp-floating-point [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: GMP Floating Point Support ====== | ====== PHP RFC: GMP Floating Point Support ====== | ||
- | * Version: 1.0 | + | * Version: 1.1 |
* Date: 2014-01-04 | * Date: 2014-01-04 | ||
* Author: Sara Golemon, pollita@php.net | * Author: Sara Golemon, pollita@php.net | ||
Line 11: | Line 11: | ||
@yohgaki suggested adding support for libgmp' | @yohgaki suggested adding support for libgmp' | ||
- | ===== Proposal ===== | + | ===== Proposal |
Extend `gmp_object` struct to the following: | Extend `gmp_object` struct to the following: | ||
Line 33: | Line 33: | ||
Add gmp_floatval(), | Add gmp_floatval(), | ||
+ | |||
+ | ===== Proposal #2 ===== | ||
+ | |||
+ | Rather than overload the GMP class for integer/ | ||
+ | |||
+ | abstract class GMPNumber {} | ||
+ | class GMPInt extends GMPNumber {} | ||
+ | class GMPFloat extends GMPNumber {} | ||
+ | |||
+ | The same open questions exist for this approach (i.e. should int/int yield float?) | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== | ||
Line 54: | Line 64: | ||
Add INI setting: | Add INI setting: | ||
gmp.default_precision=(libgmp-initial-default-precision) | gmp.default_precision=(libgmp-initial-default-precision) | ||
+ | |||
+ | ===== History ===== | ||
+ | |||
+ | * Version 1.0: 2014-01-04 Initial Draft | ||
+ | * Version 1.1: 2014-01-05 Added proposal #2 | ||
===== Implementation ===== | ===== Implementation ===== |
rfc/gmp-floating-point.1388820028.txt.gz · Last modified: 2017/09/22 13:28 (external edit)