aboutsummaryrefslogtreecommitdiff
path: root/dtoa.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* doc: add comment for dtoa.c.lijunlong2024-08-011-0/+4
|
* feature: Lua 5.3 + 5.4 integer support, with CI and conflicts fixed.Hisham Muhammad2024-06-111-28/+83
| | | | | | | | | | Co-Authored-By: Hisham Muhammad <hisham@gobolinux.org> Co-authored-by: Mark Pulford <mark@kyne.com.au> Co-authored-by: ichenq <ichenq@gmail.com> Co-authored-by: Cloud Wu <cloudwu@gmail.com> Co-authored-by: caijietao <t0350.prog@gmail.com> Co-authored-by: actboy168 <actboy168@gmail.com> Co-authored-by: wudeng <wudeng256@gmail.com> Co-authored-by: caiyiheng <rangercyh@qq.com>
* Add updated netlib dtoa.c from https://netlib.sandia.gov/fp/dtoa.c lijunlong2023-02-221-510/+2353
| | | Co-authored-by: Jesper Lundgren <jesperlundgren@exosite.com>
* bugfix: fixed bugs suspected by cppcheck: shift signed 32-bit value by 31 ↵Johnny Wang2021-10-191-3/+7
| | | | | | | | | bits and uninitialized variable. (#76) [dtoa.c:2453] -> [dtoa.c:2454]: (warning) Shifting signed 32-bit value by 31 bits is undefined behaviour. See condition at line 2453. [dtoa.c:2846]: (error) Uninitialized variable: bb [dtoa.c:2847]: (error) Uninitialized variable: bd [dtoa.c:2848]: (error) Uninitialized variable: bs [dtoa.c:2850]: (error) Uninitialized variable: delta
* Use Javascript compat values for Infinity/NaNMark Pulford2012-03-041-2/+2
| | | | | Use Javascript compatible values for Infinity/NaN when encoding invalid numbers.
* Use internal dtoa/strtod for double conversionMark Pulford2012-03-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The internal Lua CJSON dtoa/strtod routines have locale support disabled. This avoids problems under locales with comma decimal separators. Build changes: - CMake: Check for big endian architectures - Makefile: Provide option to build with dtoa.c Modifications to dtoa.c: - Include locale dtoa_config.h configuration - Rename Infinity/NaN to inf/nan to match common C libraries - Rename strtod() -> internal_strtod() to prevent conflict with libc function Modifications to g_fmt.c: - Return output string length (instead of original buffer pointer) - Provide precision as an argument to g_fmt() - Silence compilations warnings from vendor source - while(a = b) - Unused label "done:" - Only swap to scientific notation when once the number of decimal digits required exceeds the precision available. This matches standard printf format %g. - Display a "0" in front of numbers < 1.
* Added Netlib dtoa.c/g_fmt.c routines (20110428)Mark Pulford2011-12-291-0/+4356
See "www.netlib.org/fp/changes" for details.