summaryrefslogtreecommitdiffhomepage
path: root/lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib.c b/lib.c
index 1a70d37..98307f6 100644
--- a/lib.c
+++ b/lib.c
@@ -2601,6 +2601,10 @@ uc_alloc_global(uc_vm *vm)
ucv_object_add(global, "REQUIRE_SEARCH_PATH", arr);
+ /* register global math constants */
+ ucv_object_add(global, "NaN", ucv_double_new(NAN));
+ ucv_object_add(global, "Infinity", ucv_double_new(INFINITY));
+
/* register global property */
ucv_object_add(global, "global", ucv_get(global));