Bitcoin Core
28.99.0
P2P Digital Currency
src
util
serfloat.h
Go to the documentation of this file.
1
// Copyright (c) 2021-2022 The Bitcoin Core developers
2
// Distributed under the MIT software license, see the accompanying
3
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5
#ifndef BITCOIN_UTIL_SERFLOAT_H
6
#define BITCOIN_UTIL_SERFLOAT_H
7
8
#include <cstdint>
9
10
/* Encode a double using the IEEE 754 binary64 format. All NaNs are encoded as x86/ARM's
11
* positive quiet NaN with payload 0. */
12
uint64_t
EncodeDouble
(
double
f)
noexcept
;
13
/* Reverse operation of DecodeDouble. DecodeDouble(EncodeDouble(f))==f unless isnan(f). */
14
double
DecodeDouble
(uint64_t v)
noexcept
;
15
16
#endif
// BITCOIN_UTIL_SERFLOAT_H
EncodeDouble
uint64_t EncodeDouble(double f) noexcept
Definition:
serfloat.cpp:37
DecodeDouble
double DecodeDouble(uint64_t v) noexcept
Definition:
serfloat.cpp:10
Generated on Fri Jan 17 2025 20:00:14 for Bitcoin Core by
1.9.4