-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
Description
This isn't a bug but more of a question/potential point for documentation. I've been able to successfully implement functions in the FFI, but constants are proving a bit elusive for me. If I try to implement Global.infinity this way:
exports["infinity"] = []() -> boxed {
return 1000.0;
};And then I print it out later like this:
std::cout << "infinity " << unbox<double>(Global::infinity()) << std::endl;I see the following output on the console:
infinity 6.90463e-310I'm probably doing something wrong in the export, but I'm not quite sure how to get it to print the right number (in this case 1000.0, eventually I'll use the C++ infinity, but this is just a sanity check). Thanks in advance for your advice!