search for: doubletobits

Displaying 2 results from an estimated 2 matches for "doubletobits".

2010 Oct 25
1
[LLVMdev] sprintf -> snprintf conversion
...oDouble()); + snprintf(Buffer, sizeof(Buffer), "%a", APF.convertToDouble()); if (!strncmp(Buffer, "0x", 2) || !strncmp(Buffer, "-0x", 3) || !strncmp(Buffer, "+0x", 3)) @@ -1072,7 +1072,7 @@ char Buffer[100]; uint64_t ll = DoubleToBits(V); - sprintf(Buffer, "0x%llx", static_cast<long long>(ll)); + snprintf(Buffer, sizeof(Buffer), "0x%llx", static_cast<long long>(ll)); std::string Num(&Buffer[0], &Buffer[6]); unsigned long Val = strtoul(Num.c_str(), 0, 16);...
2007 Jul 15
3
[LLVMdev] Floating point constants (bug?)
>From the language guide: "The one non-intuitive notation for constants is the optional hexadecimal form of floating point constants. For example, the form 'double 0x432ff973cafa8000' is equivalent to (but harder to read than) 'double 4.5e+15'. The only time hexadecimal floating point constants are required (and the only time that they are generated by the disassembler) is