Welcome! Log In Create A New Profile

Advanced

[njs] Using acosh(0) to get NaN in runtime.

Dmitry Volyntsev
November 29, 2018 01:18PM
details: https://hg.nginx.org/njs/rev/83b64328fbb2
branches:
changeset: 679:83b64328fbb2
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Thu Nov 29 21:01:59 2018 +0300
description:
Using acosh(0) to get NaN in runtime.

macOS clang 10 optimizes sqrt(-1) out using garbage value
instead.

diffstat:

nxt/auto/clang | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r b7706e03babc -r 83b64328fbb2 nxt/auto/clang
--- a/nxt/auto/clang Wed Nov 28 21:56:19 2018 +0300
+++ b/nxt/auto/clang Thu Nov 29 21:01:59 2018 +0300
@@ -314,7 +314,7 @@ nxt_feature_test="#include <math.h>
#include <stdint.h>

int main(void) {
- int64_t i64 = sqrt(-1);
+ int64_t i64 = acosh(0);
printf(\"%x\", (uint32_t) i64);
return 0;
}"
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Using acosh(0) to get NaN in runtime.

Dmitry Volyntsev 280 November 29, 2018 01:18PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 215
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready