![]() |
Inviwo
0.9.10.1
Inviwo documentation
|
#include <glm.h>
Static Public Attributes | |
static const T | value = ((T{1} << D2) + T{1}) * rangeRatioImpl<T, D1, D2 * 2>::value |
The size of a integer types domain is 2^digits - 1 The ratio between two types is then (2^d1 - 1) / (2^d2 - 1) which for power of 2 number of digits can be written as:
(-1 + x)(1+x^1)(1+x^2)(1+x^4)(1+x^8)...(1+x^d2/2)
assuming that d1 > d2 can be simplified to:
(1+x^d2)...(1+x^d1/2)