Some Worst Cases for The Table Maker's Dilemma
In double precision IEEE-754 arithmetic
Watch this page: each time we get worst cases
for new domains and functions, we put them on this page.
Last modification: Sept. 5, 2000.
Warning: we have carefully checked the programs we are using
for getting these figures. We also have cross-checked the obtained
results. And yet, there still may be an error somewhere: we only can say
that we believe that such an error is unlikely. Hence the following results
are given as they are, without any warranty from the authors or their employers.
Note: 0^{43} means "a string of 43 consecutive
zeroes". All mantissas are expressed in binary. For instance, using
this database, one can see that if
x = 110101100.01010000101101000000100111001000101011101110 (binary)
= 3767500756895095 / 8796093022208, then
log (x) = 110.0000111101010010111100110111101011101100111111
00111111111111111111111111111111111111111111111111
111111111111111010110011001001110100100100010101110...
contains 61 consecutive ones after bit 53. This logarithm is *very*
close to an exactly representable number. This is the worst case for logarithms
of double precision numbers between 1.648 and 2980.957
Here, "log" means "natural" (i.e., radix e) logarithm.
Some special cases, derived from a simple analysis, do not need our
tests. We recall some of them for the sake of completeness.
Exponential function
Input numbers between -16 and -8
exp -1.1110100010111101101111111100110110010001010001001110
E3
= 1.1111001111100101010110001100111101001101111001010100
0 0^{54} 1111... E-23
Input numbers between -8 and -4
exp -1.0111000111100000101110000110100110110101111001111001
E2
= 1.1001010100011100011011011100010111010010010011100010
0 1^{52} 0110... E-9
Input numbers between -4 and -2
exp -1.0000001000111001001111010101100101110110011101101001
E1
= 1.0001000001100100101100101100000100000011110111011010
1 0^{53} 1111... E-3
Input numbers between -2 and -1
exp -1.0010101010011100101011011001100110011000001001100010
E0
= 1.0011111011110001111010011011001110101000000111000111
1 1^{53} 0000... E-2
exp -1.1100110000110111111011110111110111100111010100000001
E0
= 1.0101001101001101010011011110100001110000011100010011
0 0^{53} 1111... E-3
Input numbers between -1 and -1/2
exp -1.0010001011100010010011111010001111010101110011111001
E-1
= 1.0010001000010111000101000111101110000101111010101001
1 0^{52} 1110... E-1
exp -1.1101110000101011010111011111000111110111110100111101
E-1
= 1.1001010000000011111111010000111011100101000111001000
0 0^{52} 1110... E-2
Input numbers between -log(2) and log(1-2^(-10))
exp-1.0010100100001110101000001001111000110110010001111001
E-3
= 1.1011101011011110110100110000110010111111000111000011
1 1^{56} 0111... E-1
Input numbers between log(1-2^(-10)) and log(1-2^(-22))
exp-1.1010001011111110111111101111110101011000000011011111
E-13
= 1.1111111111100101110100001011101101111110101010111111
0 0^{57} 1100... E-1
Input numbers between log(1-2^(-22)) and log(1-2^(-30))
exp-1.1110110100110001100011101111101101100010011111101010
E-27
= 1.1111111111111111111111111000010010110011100111000100
1 1^{59} 0001... E-1
Input numbers between log(1-2^(-30)) and log(1-2^(-34))
exp-1.0100101111010100011001100000000110101110000111101111
E-31
= 1.1111111111111111111111111111101011010000101011100110
1 0^{55} 1001... E-1
Input numbers between log(1-2^(-34)) and log(1-2^(-42))
exp-1.0001000000000000000000000000000000000000001001000010
E-42
= 1.1111111111111111111111111111111111111111011110000000
0 0^{73} 1100... E-1
exp-1.0010000000000000000000000000000000000000001010001000
E-42
= 1.1111111111111111111111111111111111111111011100000000
0 0^{73} 1111... E-1
Input numbers between log(1-2^(-42)) and log(1-2^(-48))
exp-1.1000000000000000000000000000000000000000000000010010
E-48
= 1.1111111111111111111111111111111111111111111111010000
0 0^{89} 1000... E-1
Input numbers between log(1-2^(-48)) and 0
exp-1.0000000000000000000000000000000000000000000000000001
E-51
= 1.1111111111111111111111111111111111111111111111111100
0 0^{100} 1010... E-1
Input numbers between 0 and log(1+2^(-45))
exp 1.1111111111111111111111111111111111111111111111111111 E-53
= 1.0000000000000000000000000000000000000000000000000000 1 1^{104}
0101... E0
Input numbers between log(1+2^(-45)) and log(1+2^(-33))
exp 1.1111111111111111111111111111111111111111111111100000 E-48
= 1.0000000000000000000000000000000000000000000000011111 1 1^{89}
0101... E0
Input numbers between log(1+2^(-33)) and log(1+2^(-29))
exp 1.0111111111111110011111111111111011100000000000100100 E-32
= 1.0000000000000000000000000000000101111111111111101000 0 0^{57}
1101... E0
exp 1.1000000000000001011111111111111011011111111111011100 E-32
= 1.0000000000000000000000000000000110000000000000010111 1 1^{57}
0010... E0
exp 1.1001111010011100101110111111110101100000100000001011 E-31
= 1.0000000000000000000000000000001100111101001110010111 1 0^{57}
1010... E0
Input numbers between log(1+2^(-29)) and log(1+2^(-17))
exp 1.1101011110100111110110001001001101100000100111100101 E-26
= 1.0000000000000000000000000111010111101001111101100100 0 0^{55}
1011... E0
Input numbers between log(1+2^(-17)) and log(1+2^(-9))
exp 1.1011101000000111110101110011001001010000110111100111 E-14
= 1.0000000000000110111010000011011100110110111110001100 1 0^{55}
1010... E0
exp 1.1101011101111111110100010011110100100111111111111111 E-11
= 1.0000000000111010111101101100001101111100000111010011 0 0^{55}
1001... E0
Input numbers between log(1+2^(-9)) and log(2) = 0.693...
exp 1.0110101001001101000110101111100111001100100110001001 E-8
= 1.0000000101101011010011011111001100101001100111010111 0 1^{54}
0100... E0
Input numbers between log(2) = 0.693... and 1
exp 1.1010110011001111101111100100011010110100111011110000 E-1
= 10.010011111000010111001001011110000011110111001110000 0 1^{54}
0101...
Input numbers between 1 and 2
exp 1.1010110010100111101011101000110110100101101001111011
= 101.01010101111101010010101100110101111110010101010110 1 0^{53}
1000...
exp 1.1101011000110011011010101000100000000111011110101010
= 110.01000110101000110111111111010101000000111111110111 0 0^{53}
1011...
Input numbers between 2 and 4
exp 10.100001011101110001111000111110111000100100101000110
= 1100.0111011011110010010010010110110010110000001110001 1 1^{51}
0000...
Input numbers between 4 and 8
exp 110.00001111010100101111001101111010111011001111110100
= 110101100.01010000101101000000100111001000101011101110 0 0^{57}
1000...
Input numbers between 8 and 16
exp 1.0111011011100111111001011101011110110110111010101100
E3
= 1.1101111001111100110101100111010100010000001010011010
0 0^{51} 1110... E16
exp 1.1010100011101010110100000101100010111100011010111000
E3
= 1.0001110101110001100101100101111101010001011010101101
1 0^{51} 1001... E19
Input numbers between 16 and 32
exp 1.0001110101011100001011011010111010111110001101100111
E4
= 1.1010100011000000001011101001011101001100001100010100
1 1^{54} 0001... E25
exp 1.1100010001001100111000001101011100010110101000011010
E4
= 1.1011100010010000110010101000011000110111101011100001
1 1^{54} 0010... E40
Natural logarithm function
Input numbers between 1 and 2
log 1.0000000000000000000000000000000000000000000000000001 E0
= 1.1111111111111111111111111111111111111111111111111111 0 0^{51}
1010... E-53
Input numbers between 2 and e=2.718...
log 10.000000000001001011101100101100000011100111001001110
= 1.0110001011110111000111000100011001010110101101100000 1 1^{51}
0111... E-1
Input numbers between e=2.718... and e^2 = 7.389...
log 110.01000110101000110111111111010101000000111111110111
= 1.1101011000110011011010101000100000000111011110101001 1 1^{54}
0000...
Input numbers between e^2 = 7.389... and e^4 = 54.598...
log 111.01111000110111111110110011000111111101010111111100
= 10.000000101101110100000101100111011011010001101011000 1 1^{52}
0101...
log 1001.0101100010001100110011110010010010111011100111001
= 10.001111000010010011011110101110110010101111100111000 1 0^{52}
1011...
log 1010.1010111110000111010101010000110110010111111001000
= 10.010111100111000001100101100101011010011110101011111 0 0^{52}
1111...
log 1100.0111011011110010010010010110110010110000001110010
= 10.100001011101110001111000111110111000100100101000110 0 0^{52}
1001...
log 10001.000110000110011101100011011111001011110100000011
= 10.110101101011101111101111110001111001101010000100001 1 0^{52}
1000...
log 10011.110110011101011111010101100101111010100111011101
= 10.111111001111111000010010101011100000011111011101110 0 1^{52}
0101...
log 10111.111100111000001001010111011110001010101010101111
= 11.001011010000111110010000011111110101111000000000110 0 1^{52}
0111...
Input numbers between e^4 = 54.598... and e^8 = 2980.957...
log 110101100.01010000101101000000100111001000101011101110
= 110.00001111010100101111001101111010111011001111110011 1 1^{60}
0101...
Input numbers between e^8 = 2980.957... and e^16
= 8.8861105... 10^6
log 1.1101111001111100110101100111010100010000001010011010
E16
= 1.0111011011100111111001011101011110110110111010101011
1 1^{55} 0000... E3
Sine function
Input numbers between 1/32 and 1/16
sin 1.1001001010000011010110000110010100000011111111100000 E-5
= 1.1001001001011001111000110111000010001011110100111001 1 1^{55}
0001... E-5
sin 1.1101011110111101110011010111011110000000010010011111 E-5
= 1.1101011101111011000100010111111100100011000011010101 1 1^{55}
0010... E-5
Input numbers between 1/16 and 1/8
sin 1.1010001000000010101100111111101110000100011110001000 E-4
= 1.1010000101001001000011001000110000000110101110100110 1 {1}^52
0101... E-4
Input numbers between 1/8 and 1/4
sin 1.1101000000110111110010110010011111101110011011011111 E-3
= 1.1100110001000000110000111000000001010010001010011010 0 1^{52}
0000... E-3
sin 1.1101010100000110010011100110111111101000001011000101 E-3
= 1.1101000011101111011110011001000000000001101110101001 0 0^{52}
1011... E-3
Input numbers between 1/4 and 1/2
sin 1.1111111001110110011101110011100111010000111101101101 E-2
= 1.1110100110010101000001110011000011000100011010010101 1 1^{65}
0000... E-2
Input numbers between 1/2 and 1
sin 1.1101100110001100010011000110000100100111000110001101 E-1
= 1.1001100011011100110100001001001100110111011110010010 1 0^{54}
1011... E-1
Input numbers between 1 and 2
sin 1.1001001000011111101101010100010001000010110100011000
= 1.1111111111111111111111111111111111111111111111111111 1 1^{54}
0110... E-1
Arc-sine function
Input numbers between sin(1/32) = 0.0312449... and sin(1/16) = 0.062459...
asn 1.1001001001011001111000110111000010001011110100111010 E-5
= 1.1001001010000011010110000110010100000011111111100000 0 0^{55}
1110... E-5
asn 1.1101011101111011000100010111111100100011000011010110 E-5
= 1.1101011110111101110011010111011110000000010010011111 0 0^{55}
1101... E-5
Input numbers between sin(1/16) = 0.062459... and sin(1/8) =
0.1246...
asn 1.1010000101001001000011001000110000000110101110100111 E-4
= 1.1010001000000010101100111111101110000100011110001000 0 0^{52}
1010... E-4
Input numbers between sin(1/8) = 0.1246... and sin(1/4) = 0.247...
asn 1.1001011010010111110010110110000000101100010110000010 E-3
= 1.1001100101001111111110110101110110101111000011111001 0 1^52
0101... E-3
asn 1.1101000011101111011110011001000000000001101110101001 E-3
= 1.1101010100000110010011100110111111101000001011000100 1 1^52
0011... E-3
Input numbers between sin(1/4) = 0.247... and sin(1/2) = 0.479...
asn 1.1110100110010101000001110011000011000100011010010110 E-2
= 1.1111111001110110011101110011100111010000111101101101 0 0^64
1000... E-2
Input numbers between sin(1/2) = 0.479... and sin(1) = 0.841...
asn 1.0001111011010000011011010101000011110111111010001000 E-1
= 1.0011000001110000011011110110100110010100011001101101 0 1^{51}
0101... E-1
Input numbers between sin(1) = 0.841... and 1
asn 1.1101010110110000010110101000100111010011111001110111 E-1
= 1.0010100101010001011110101011010011000001001100101010 1 0^{51}
1000...
asn 1.1110001001100100001101010111111010100000111000101001 E-1
= 1.0011101010100011000000011111011011101011101100011101 1 1^{51}
0001...
Cosine function
Input numbers between 1/32 and 1/16
cos 1.0101010010011110110000001100000011000101101011111010 E-5
= 1.1111111110001110101101101010100100011110110010110000 0 0^{54}
1111... E-1
Input numbers between 1/16 and 1/8
cos 1.0001011011100101001101001110111000110110010110000000 E-4
= 1.1111111011010000010001110110111111000111010111001001 1 0^{53}
1000... E-1
Input numbers between 1/8 and 1/4
cos 1.1110111111101110111101100001110100111001101011000010 E-3
= 1.1111000100001111110001100001111000101100011110001110 1 1^{52}
0000... E-1
Input numbers between 1/4 and 1/2
cos 1.1111111010110001111101111001001000001110001001001000 E-2
= 1.1100000110100010011110101110100000110110111100010010 1 0^{52}
1010... E-1
Input numbers between 1/2 and 1
cos 1.0111110010110111011001001000010100100110111110011001 E-1
= 1.0111100011011010111100000001000000110110110100001100 1 1^{52}
0011... E-1
cos 1.1100011001011010000101110000010001110100010101001001 E-1
= 1.0100001101001010001101100100010110111110001000001000 0 1^{51}
0111... E-1
Input numbers between 1 and 12867/8192 = 1.5706787... (slightly less
than pi/2)
cos 1.0110101110001010011000100111001111010111110000100001 E0
= 1.0011001101111111110001011011000001110010110001010010 1 0^{54}
1011... E-3
Arc-cosine function
Input numbers between cos(12867/8192) = 1.176 .10^(-4) and cos(1) = 0.540...
acs 1.1111110101110011011110111110100100010100010101111000 E-11
= 1.1001000111100000000001101101010000011101100011011000 1 1^{62}
0010... E0
Input numbers between cos(1) = 0.540... and cos(1/2)=0.877...
acs 1.0100000110000010000110011001100110011000010110000111 E-1
= 1.1100100010100101001110001010111010000011110100011111 0 1^{53}
0011... E-1
Input numbers between cos(1/2)=0.877... and cos(1/4) = 0.968...
acs 1.1110010001011010000111001001001101100101000111101100 E-1
= 1.0101001000001101110001010101001111110110101100100011 1 0^{49}
1000... E-2
Input numbers between cos(1/4) = 0.968... and and cos(1/32) = .99951...
acs 1.1111000100001111110001100001111000101100011110001111 E-1
= 1.1110111111101110111101100001110100111001101011000001 1 1^{48}
0000... E-3
Tan function
Input numbers between 1/32 and 1/16
tan 1.0101000001001000011010110010111110000111000000010100 E-5
= 1.0101000001111000110011101011111111111001110001110010 1 0^{57}
1001... E-5
Input numbers between 1/16 and 1/8
tan 1.0101001011000011100111101111000001110000110010101101 E-4
= 1.0101001110001001111001101101111101000001100101111000 1 1^{53}
0001... E-4
Input numbers between 1/8 and 1/4
tan 1.1010001100111111001100101010110001011100111010110101 E-3
= 1.1010100100110011111111100001011101101011001101110101 0 0^{55}
1010... E-3
Input numbers between 1/4 and arctan(1/2) = 0.463647...
tan 1.1101011010010110101111111010100110001000110110111001 E-2
= 1.1111101011000111000111001101001101001110111010100110 1 0^{51}
1001... E-2
Input numbers between arctan(1/2) = 0.463647... and arctan(2) = 1.107148...
tan 1.0100011010101100001101110010001001000011010100110110 E-1
= 1.0111101110100100100111110111001110011000001010011110 1 1^{54}
0011... E-1
Arctan function
Input numbers between tan(1/32) = 0.0312601... and tan(1/16)
= 0.062581...
arctan 1.0000111111001001111100011111101010111110011001011000 E-5
= 1.0000111110110000011011101101111010011001011100111010 0 0^{52}
1111... E-5
arctan 1.0001101110111110100111000010010101010110100110001101 E-5
= 1.0001101110100001100101010001110110110001110101101101 1 1^{52}
0111... E-5
arctan 1.1000110111011101001001011010101110010000110010100001 E-5
= 1.1000110110001101001011010100101111010110111110100010 1 1^{52}
0110... E-5
Input numbers between tan(1/16) = 0.062581... and tan(1/8) = 0.125655...
arctan 1.0101001110001001111001101101111101000001100101111001 E-4
= 1.0101001011000011100111101111000001110000110010101101 0 0^{53}
1110... E-4
Input numbers between tan(1/8) = 0.125655... and tan(1/4) = 0.2553419...
atn 1.1010100100110011111111100001011101101011001101110101 E-3
= 1.1010001100111111001100101010110001011100111010110100 1 1^55
0110... E-3
Input numbers between 1/4 and 1/2
arctan 1.0000111101101110010111011001100101100000001110010111 E-2
= 1.0000100101010100010010110111000110101101010010100110 1 0^{54}
1001... E-2
Input numbers between 1/2 and 2
arctan 1.0111101110100100100111110111001110011000001010011111 E-1
= 1.0100011010101100001101110010001001000011010100110110 0 0^55
1111... E-1
2^x function
Input numbers between 1/2 and 1
2^ 1.0001011010100111011011101100010000011011010100010110
E-1
= 1.0111010101010000011010000101101001000010110001100011
1 0^{51} 1000... E0
2^ 1.0011111000110100111110100110101010111001011010011110
E-1
= 1.1000100111011001010010001010100101001111111000010110
1 1^{51} 0010... E0
2^ 1.0100101001100011111111110001110101010011111101010011
E-1
= 1.1001000001100110000111011010000100101101010100101000
1 0^{51} 1011... E0
2^ 1.1011001100101010011011001001001011010001000110000101
E-1
= 1.1100110101101011001101111110110111101100111010101111
0 1^{51} 0111... E0
Input numbers between 1 and 2 (this suffices to get
all cases for input numbers > 1)
2 ^ 1.0010010111011101100111101110110110101100011110011010
E0
= 1.0001101110100011100111111111001010001110001111101001
1 1^{53} 0001... E1
Up to "Introduction
to the Table Maker's Dilemma"
Vincent Lefèvre
Home Page
Jean-Michel Muller Home
Page