mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
LibCrypto: Add naive implementation of {Un,}SignedBigInteger::to_double
This commit is contained in:
parent
62bc238ac3
commit
bcdad57670
4 changed files with 16 additions and 0 deletions
|
@ -112,6 +112,12 @@ u64 UnsignedBigInteger::to_u64() const
|
|||
return value;
|
||||
}
|
||||
|
||||
double UnsignedBigInteger::to_double() const
|
||||
{
|
||||
// FIXME: I am naive
|
||||
return static_cast<double>(to_u64());
|
||||
}
|
||||
|
||||
void UnsignedBigInteger::set_to_0()
|
||||
{
|
||||
m_words.clear_with_capacity();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue