Commit Graph

130 Commits

Author SHA1 Message Date
Alex Henrie acd2f1e59b msvcrt: Compile but show an error if Bessel functions aren't available.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-05 06:59:19 -06:00
Alex Henrie f0e74961e1 msvcrt: Fix mistakes in comments.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-10 18:49:24 +01:00
Alex Henrie 86597db834 msvcrt: Don't include MSVC 10.0+ math functions in SOs for older DLLs.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-26 19:07:00 +01:00
Piotr Caban 22edbd849a msvcrt: Correctly set rounding mode in _ftol implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-18 12:35:13 +01:00
Piotr Caban ee33d38c50 msvcrt: Call cdecl functions with empty FPU stack in _CI* functions.
The FPU stack should be empty on cdecl function call. Failing to do so
breaks GCC 6.4.0 -O2 optimized code.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-28 13:02:07 +01:00
Alex Henrie 06d9c7e25e libport: Move rint fallback implementations from msvcrt to libport.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-08 20:39:04 +01:00
Alex Henrie 3864851feb msvcrt: Set the correct error number in pow(f).
Old versions of MSVC set EDOM on pow(-1, INFINITY) and
pow(-1, -INFINITY) but new versions do not.

Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-18 18:44:35 +02:00
Martin Storsjo a44b52d102 msvcrt: Export -f suffixed float functions functions on arm64.
Signed-off-by: Martin Storsjo <martin@martin.st>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-03 19:18:06 +02:00
Alex Henrie 994c071a11 msvcrt: Set errno through the _matherr function.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-02 14:16:50 +02:00
Alex Henrie d20b89cf93 msvcrt: Don't set errno in sqrt(f) if x is positive infinity.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-01 19:39:54 +02:00
Alex Henrie 6e73ef2091 msvcrt: Don't set errno in sinh(f), cosh(f), or atan2(f) if x is ±INF.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-31 15:04:48 +02:00
Alex Henrie 70c338c27a msvcrt: Don't set errno in _logb(f) if x is ±INF.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-31 15:04:45 +02:00
Alex Henrie 9e3b3c9bac msvcrt: Set errno in _logb(f) if x is 0.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-31 15:04:41 +02:00
Alex Henrie 417b2a4f52 msvcr120: Don't double-check error conditions in log2f.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-27 21:59:40 +02:00
Alex Henrie 79c3b610c4 msvcrt: Set ERANGE in exp functions on finite input and infinite output.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-26 22:14:00 +02:00
Alex Henrie eca2999113 msvcr120: Declare ret as a float in functions that return a float.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-24 18:58:31 +02:00
Alex Henrie f5d3ba5888 msvcrt: Don't set errno in log functions if x is positive infinity.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +02:00
Alex Henrie b1230c3484 msvcr120: Set errno in log2.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:34 +02:00
Alex Henrie 31b835d0e0 msvcr120: Add log1p.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:33 +02:00
Alex Henrie 79715cce88 msvcr120: Add expm1.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-14 13:53:26 +02:00
Alex Henrie 26163f5cdf msvcr120: Add erfc.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-14 13:53:11 +02:00
Alex Henrie 860c1578e6 msvcr120: Add atanh.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:30:44 +02:00
Alex Henrie f1dad14807 msvcr120: Add acosh.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:30:27 +02:00
Piotr Caban 4df7ced7b0 msvcr120: Add fallback implementation of asinh.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:29:57 +02:00
Piotr Caban e495e25af7 msvcr120: Add fallback implementation of erf function.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:29:55 +02:00
Alex Henrie ddff85a361 msvcr120: If erff is not available, fall back to erf.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 11:29:48 +02:00
Piotr Caban 92651b9850 msvcr120: Add fesetround implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 16:47:30 +02:00
Carlo Bramini 5f2b9d5968 msvcrt: Use return value of *printf() instead of calling strlen() and simplify code.
Signed-off-by: Carlo Bramini <carlo_bramini@users.sourceforge.net>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-22 16:44:33 +01:00
Jacek Caban 60c98caa94 msvcrt: Added lldiv implementation.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-20 19:29:39 +01:00
Piotr Caban 10200af741 msvcr120: Add _except1 implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-17 20:54:07 +01:00
Piotr Caban 98a0c3df2e msvcrt: Add fesetenv implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-07 22:05:31 +01:00
Fabian Maurer 986a67ab37 msvcr120: Add fesetenv stub.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-07 22:05:31 +01:00
Daniel Lehman 09e4fc834d msvcrt: Implement nan.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-27 16:31:45 +01:00
Stefan Silviu 4d37b87219 msvcrt: Implement nearbyint and nearbyintf.
Signed-off-by: Stefan Silviu <sylviu44@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-22 16:30:40 +01:00
Daniel Lehman 28a5405968 msvcr120: Add lgamma.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-15 18:30:11 +09:00
Piotr Caban d7dd5d8fe4 msvcr100: Fix compilation on NetBSD (conflicting fenv_t definitions).
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-15 21:35:12 +09:00
Piotr Caban 1150c0454d msvcr120: Add fegetenv implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-05 23:22:04 +09:00
Piotr Caban 6b6f3406f4 ucrtbase: Add __fpe_flt_rounds implementation.
Based on a patch by Alex Henrie.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-06-13 19:46:38 +09:00
Francois Gouget 8e382e97e9 msvcrt: The fpclass() constants are not defines.
Solaris is the only platform that has fpclass() and it defines
the constants in the fpclass_t enum.
So this reverts commit b004771314.

Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-26 14:48:52 +09:00
Daniel Lehman d9a0c55e7e msvcr120: Add remainder.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-07 20:58:11 +09:00
Daniel Lehman 9acfcb0eba msvcr120: Add scalbn.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-05 00:06:44 +09:00
Daniel Lehman e084240415 msvcr120: Add asinh.
Signed-off-by: Daniel Lehman <dlehman@esri.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-31 19:49:41 +09:00
Piotr Caban 68fedc1268 msvcr120: Add _set_FMA3_enable stub.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-19 14:31:46 +09:00
Piotr Caban 4083af404b msvcr120: Add _dpcomp implementation.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-19 01:59:58 +09:00
Piotr Caban 0806b06f2b msvcrt: Fix modff signature.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-01-16 01:06:46 +09:00
YongHao Hu 072f34be73 msvcr120: Enable MSVCRT__nextafterf when _MSVCR_VER>=120.
Signed-off-by: YongHao Hu <christopherwuy@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-29 17:51:59 +01:00
Paul Gofman a3c818b33d msvcrt: Rename __libm_sse2_* functions to fix compilation when using Intel compiler.
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-22 13:51:32 +01:00
Piotr Caban 09a727c33c msvcr120: Add fmin implementation. 2015-09-14 16:47:52 +09:00
Daniel Lehman e89813fe3c msvcr120: Add erf functions. 2015-05-29 16:16:21 +09:00
Piotr Caban 530d269e01 msvcr120: Add _dsign implementation. 2015-05-26 22:44:52 +09:00