pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/AssemblyScript/assemblyscript/commit/5e17892ca903b6ccbe026d0b97bade07c5388f65

hub.githubassets.com/assets/global-d18f184ea1a06a2c.css" /> fix: Use proper portable copysign polyfill (#2490) · AssemblyScript/assemblyscript@5e17892 · GitHub
Skip to content

Commit 5e17892

Browse files
authored
fix: Use proper portable copysign polyfill (#2490)
1 parent f9dee72 commit 5e17892

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

std/portable/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ if (typeof globalScope.ASC_TARGET === "undefined") {
140140
const INV_EPS64 = 4503599627370496.0;
141141
const y = Math.abs(value);
142142
return y < INV_EPS64
143-
? Math.abs(y + INV_EPS64 - INV_EPS64) * Math.sign(value)
143+
? (y + INV_EPS64 - INV_EPS64) * Math.sign(value)
144144
: value;
145145
};
146146

@@ -153,7 +153,9 @@ if (typeof globalScope.ASC_TARGET === "undefined") {
153153
globalScope["trunc"] = Math.trunc;
154154

155155
globalScope["copysign"] = function copysign(x, y) {
156-
return Math.abs(x) * Math.sign(y);
156+
return y
157+
? Math.abs(x) * Math.sign(y)
158+
: (F64[0] = y, U64[1] >>> 31 ? -1 : 1); // +0, -0, -NaN, +NaN
157159
};
158160

159161
globalScope["bswap"] = function bswap(value) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy