REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 2.08 KB
Close
/opt/alt/php70/usr/include/php/ext/mysqlnd/mysql_float_to_double.h
Text
Base64
/* +----------------------------------------------------------------------+ | PHP Version 7 | +----------------------------------------------------------------------+ | Copyright (c) 2006-2017 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | | available through the world-wide-web at the following url: | | http://www.php.net/license/3_01.txt | | If you did not receive a copy of the PHP license and are unable to | | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: Keyur Govande <kgovande@gmail.com> | +----------------------------------------------------------------------+ */ #ifndef MYSQL_FLOAT_TO_DOUBLE_H #define MYSQL_FLOAT_TO_DOUBLE_H #include "main/php.h" #include <float.h> #include "main/snprintf.h" #define MAX_CHAR_BUF_LEN 255 #ifndef FLT_DIG # define FLT_DIG 6 #endif /* * Convert from a 4-byte float to a 8-byte decimal by first converting * the float to a string, and then the string to a double. * The decimals argument specifies the precision of the output. If decimals * is less than zero, then a gcvt(3) like logic is used with the significant * digits set to FLT_DIG i.e. 6. */ static inline double mysql_float_to_double(float fp4, int decimals) { char num_buf[MAX_CHAR_BUF_LEN]; /* Over allocated */ if (decimals < 0) { php_gcvt(fp4, FLT_DIG, '.', 'e', num_buf); } else { php_sprintf(num_buf, "%.*f", decimals, fp4); } return zend_strtod(num_buf, NULL); } /* * Local variables: * tab-width: 4 * c-basic-offset: 4 * End: * vim600: noet sw=4 ts=4 fdm=marker * vim<600: noet sw=4 ts=4 */ #endif /* MYSQL_FLOAT_TO_DOUBLE_H */
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 20
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
config-win.h
3.23 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd.h
15.85 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_alloc.h
5.62 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_block_alloc.h
1.62 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_charset.h
2.35 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_debug.h
9.72 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_enum_n_def.h
19.65 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_ext_plugin.h
4.83 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_libmysql_compat.h
7.48 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_net.h
1.68 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_portability.h
16.71 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_priv.h
8.01 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_result.h
2.03 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_result_meta.h
1.78 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_reverse_api.h
1.96 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_statistics.h
7.68 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_structs.h
54.19 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysqlnd_wireprotocol.h
10.08 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mysql_float_to_double.h
2.08 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
php_mysqlnd.h
1.55 KB
lrw-r--r--
2026-03-08 18:08:07
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).