Peano
Loading...
Searching...
No Matches
CompressedFloatingPointNumbers.h
Go to the documentation of this file.
1
// This file is part of the Peano project. For conditions of distribution and
2
// use, please see the copyright notice at www.peano-framework.org
3
#pragma once
4
5
6
namespace
toolbox
{
15
namespace
multiprecision {
21
template
<
class
T>
22
void
decompose
(
23
const
double
& value,
24
char
& exponent,
25
T& mantissa
26
);
27
69
void
decomposeIntoEightVariants
(
70
double
value,
71
char
exponent[8],
72
long
int
mantissa[8],
73
double
error[8]
74
);
75
79
void
decomposeIntoFourVariants
(
80
double
value,
81
char
exponent[4],
82
int
mantissa[4],
83
double
error[4]
84
);
85
95
int
findMostAgressiveCompression
(
96
double
value,
97
double
maxAbsoluteError
98
);
99
100
127
int
findMostAgressiveCompression
(
128
const
double
values[],
129
int
count,
130
double
maxError
131
);
132
133
147
void
decompose
(
148
double
value,
149
char
& exponent,
150
long
int
& mantissa,
151
int
bytesUsedForMantissa
152
);
153
183
template
<
class
T>
184
double
compose
(
185
const
char
& exponent,
186
const
T& mantissa
187
);
188
197
double
compose
(
198
char
exponent,
199
long
int
mantissa,
200
int
bytesUsedForMantissa
201
);
202
}
203
}
204
205
206
#include "
CompressedFloatingPointNumbers.cpph
"
207
CompressedFloatingPointNumbers.cpph
toolbox::multiprecision::decompose
void decompose(const double &value, char &exponent, T &mantissa)
Takes a double and returns the exponent and the mantissa.
Definition
CompressedFloatingPointNumbers.cpph:6
toolbox::multiprecision::compose
double compose(const char &exponent, const T &mantissa)
Definition
CompressedFloatingPointNumbers.cpph:29
toolbox::multiprecision::findMostAgressiveCompression
int findMostAgressiveCompression(double value, double maxAbsoluteError)
Analyses the handed data and determines the most aggressive compression.
toolbox::multiprecision::decomposeIntoFourVariants
void decomposeIntoFourVariants(double value, char exponent[4], int mantissa[4], double error[4])
Definition
CompressedFloatingPointNumbers.cpp:203
toolbox::multiprecision::decomposeIntoEightVariants
void decomposeIntoEightVariants(double value, char exponent[8], long int mantissa[8], double error[8])
Decompose floating point value.
toolbox
Definition
InterpolationRestriction.h:10
src
toolbox
multiprecision
CompressedFloatingPointNumbers.h
Generated on Fri Apr 11 2025 10:18:15 for Peano by
1.10.0