Doing it without Floating Real and Solid Computing Abbas Edalat.
-
Upload
darcy-watkins -
Category
Documents
-
view
216 -
download
0
Transcript of Doing it without Floating Real and Solid Computing Abbas Edalat.
![Page 1: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/1.jpg)
Doing it without Floating
Real and Solid Computing
Abbas Edalat
![Page 2: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/2.jpg)
Overview
• Floating Point Computation• Exact Real Arithmetic• Solid Modelling & Computational
Geometry• A New Integration• The Moral of Our Story
• The Story of the Decimal System
![Page 3: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/3.jpg)
Decimal System
• Foundation of our computer revolution.• Imagine computing in the Roman system
CCXXXII times XLVIII, i.e. 232 48.• Zero was invented by Indian
mathematicians, who were inspired by the Babylonian and the Chinese number systems, particularly as used in abacuses.
2 104 103 2 40 3000 3042
10Base 9} 8, 7, 6, 5, 4, 3, 2, 1, 0, {Digits3
![Page 4: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/4.jpg)
The Discovery of Decimal Fractions
• They discovered the rules for basic arithmetic operations that we now learn in school.
• Persians and Arabs invented the representation of decimal fractions that we use today:
2 1 310 5 10 7 2 10 4 10 3 042.75 3
![Page 5: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/5.jpg)
The Long Journey
Diophantus3rdc. AD
Brahmagupta, 598 ADSridhara, 850 AD
Adelard 1080 AD
House of Wisdom9thc. AD
Khwarizmi780 AD
Kashani1380 AD
![Page 6: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/6.jpg)
Khwarizmi (780 – 850)
• Settled in the House of Wisdom (Baghdad).
• Wrote three books:– Hindu Arithmetic– Al-jabr va Al-Moghabela– Astronomical Tables
• The established words:“Algorithm” from “Al-Khwarizmiand “Algebra” from “Al-jabr”testify to his fundamentalcontribution to human thought.
![Page 7: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/7.jpg)
The Long Journey
Diophantus3rdc. AD
Brahmagupta, 598 ADSridhara, 850 AD
Adelard 1080 AD
House of Wisdom9thc. AD
Khwarizmi780 AD
Kashani1380 AD
![Page 8: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/8.jpg)
Adelard of Bath (1080 – 1160)
• First English Scientist.• Translated from Arabic to
Latin Khwarizmi’s astronomical tables with their use of zero.
• After a long rivalry between Algorists and abacists, the decimal system replaced the abacus.
![Page 9: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/9.jpg)
The Long Journey
Diophantus3rdc. AD
Brahmagupta, 598 ADSridhara, 850 AD
Adelard 1080 AD
House of Wisdom9thc. AD
Khwarizmi780 AD
Kashani1380 AD
![Page 10: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/10.jpg)
Kashani (1380 – 1429)• Developed arithmetic algorithms
for fractions, that we use today.
• Computed up to 16 decimals.1sin
368 306 80523 28 n• He used
2 793 589 653 592 141.3• Computed up to 16 decimal
places:
• Took the unit circle.• The circumferences of the
inscribed and circumscribed polygons with n sides give lower and upper bounds for 2.
• Took the unit circle.• The circumferences of the
inscribed and circumscribed polygons with n sides give lower and upper bounds for 2.
• Took the unit circle.
![Page 11: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/11.jpg)
• Kashani invented the first mechanical special purpose computers:– to find when the planets are
closest,– to calculate longitudes of
planets,– to predict lunar eclipses.
Kashani (1380 – 1429)
![Page 12: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/12.jpg)
Kashani’s Planetarium
![Page 13: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/13.jpg)
Mechanical Computers in Europe
Leibniz(1646 –1716)
Pascal(1632 – 1662)
Napier(1550-1617)
Oughtred(1575 – 1660)
Babbage(1792 – 1871)
![Page 14: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/14.jpg)
Modern Computers: Floating Point Numbers
• Any other number like is rounded or approximated to a close floating point number.
5110 817310.
• Represents only a finite collection of numbers.
Sign
5 1
Exponent
8 1 7 3
Mantissa
![Page 15: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/15.jpg)
10
10
10
20101010
10102010
10102010
2020
2020
2020
Floating Point Arithmetic is not sound
• A simple calculation shows:
• But using IEEE’s standard precision, we get three different results,
![Page 16: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/16.jpg)
20101010
10102010
10102010
2020
2020
2020
Floating Point Arithmetic is not sound
• A simple calculation shows:
20
10
0
• But using IEEE’s standard precision, we get three different results, all wrong.
![Page 17: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/17.jpg)
Failure of Floating Point Computation
0 102558961 5.41869520
1 159018721 64919121
21
21
xx
xx
• Double precision floating-point arithmetic gives: 5.41869520~ 102558961~
21 xx
• The correct solution is:
83739041 205117922 21 xx
![Page 18: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/18.jpg)
• Depending on the floating point format, the sequence tends to 1 or 2 or 3 or 4.
• In reality, it oscillates about 1.51 and 2.37.
Failure of Floating Point Computation
2470304
2435203
3185100050721.1
23
234
1
0
nnn
nnnn aaa
aaaa
a
![Page 19: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/19.jpg)
Failure of Floating Point Computation
• In any floating point format, the sequence converges to 100.
• In reality, it converges to 6.
nnnn aaa
aaa1
110
30001130111
11
61
2
11
Floating Point Exact Arithmetic
5.6334313 a 5.6334313 a
![Page 20: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/20.jpg)
Failure of Floating Point Computation
• In any floating point format, the sequence converges to 100.
• In reality, it converges to 6.
nnnn aaa
aaa1
110
30001130111
11
61
2
11
Floating Point Exact Arithmetic
6.56399413 a 5.91452513 a
68.46342415 a 5.93905015 a
![Page 21: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/21.jpg)
Failure of Floating Point Computation
• In any floating point format, the sequence converges to 100.
• In reality, it converges to 6.
nnnn aaa
aaa1
110
30001130111
11
61
2
11
Floating Point Exact Arithmetic99.99996420 a 5.97457920 a100.00000040 a 5.99932040 a
5.99999980 a100.00000080 a
![Page 22: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/22.jpg)
• The client will invest £e, i.e. £2.71828...
• Initially, there is a bank fee of £1.
Banker’s Example
• A banker offers a client a 25 year investment scheme.
![Page 23: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/23.jpg)
• After 1 year, the money is multiplied by 1, and £1 bank fee is subtracted.
Banker’s Example
![Page 24: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/24.jpg)
• After 2 years, the money is multiplied by 2, and £1 bank fee is subtracted.
Banker’s Example
![Page 25: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/25.jpg)
• After 3 years, the money is multiplied by 3, and £1 bank fee is subtracted.
• And so on . . .
Banker’s Example
![Page 26: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/26.jpg)
• Finally, after 25 years, the money is multiplied by 25, and £1 bank fee is subtracted. The final balance is returned to the client.
Banker’s Example
![Page 27: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/27.jpg)
-££££• He finds out that he would
have an overdraft of £2,000,000,000.00 !!
Banker’s Example• The client calculates his final
balance after 25 year
with floating point numbers on his computer.
)!25
1.......
!3
1
!2
111(!25 e
![Page 28: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/28.jpg)
+££££
• Suspicious about this astonishing result, he buys a better computer.
Banker’s Example
• This time he calculatesthat after 25 years he would have a credit of £4,000,000,000.00 !!
![Page 29: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/29.jpg)
• The client’s balance is:
• He is delighted and makes the investment.
4p
Banker’s Example
)!25
1.......
!3
1
!2
111(!25 e
• 25 years later, the banker, using correct arithmetic, computes the value of
![Page 30: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/30.jpg)
Pilot’s dilemma
Left, right or straight?
On February 25, 1991, during the Gulf War, an American Patriot Missile battery in Dharan, Saudi Arabia, failed to intercept an incoming Iraqi Scud missile, due to failure of floating point computation. The Scud missile struck an American Army barracks and killed 28 soldiers.
![Page 31: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/31.jpg)
• Evaluate numerical expressions correctly up to any given number of decimal places.
Exact Real Arithmetic
3 4
• Real numbers have in general an infinite decimal expansion.
=3.1415 . . . gives a shrinking sequence of rational intervals.
![Page 32: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/32.jpg)
Exact Real Arithmetic
1.3 2.3
• Evaluate numerical expressions correctly up to any given number of decimal places.
• Real numbers have in general an infinite decimal expansion.
=3.1415 . . . gives a shrinking sequence of rational intervals.
![Page 33: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/33.jpg)
Exact Real Arithmetic
14.3 15.3
• Evaluate numerical expressions correctly up to any given number of decimal places.
• Real numbers have in general an infinite decimal expansion.
=3.1415 . . . gives a shrinking sequence of rational intervals.
![Page 34: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/34.jpg)
• A computation is possible only if any output digit can be calculated from a finite number of the input digits.
Exact Real Arithmetic
.1
.0
Conclusion: Multiplication is not computable in the decimal system.
3333.0
output input
Multiplyby 3
![Page 35: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/35.jpg)
The Signed Decimal System
9} 8, 7, 6, 5, 4, 3, 2, 1, 0, 1,- 2,- 3,- 4,- 5,- 6,- 7,- 8,- {-9,
![Page 36: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/36.jpg)
The Signed Decimal System
• Gives a redundant representation.
44.83 100
6
10
53)20(100 65.321
9} 8, 7, 6, 5, 4, 3, 2, 1, 0, ,1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 {
1000.1 33332.0Multiplyby 3
• We can now compute:
![Page 37: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/37.jpg)
Numbers as Sequences of Operations
• Signed binary system:
.01 1
1.0
1] 1,- [ Interval Base
2Base 1} 0, ,1 {Digits
![Page 38: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/38.jpg)
.01 1
Numbers as Sequences of Operations
0.0
• Signed binary system:
1] 1,- [ Interval Base
2Base 1} 0, ,1 {Digits
![Page 39: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/39.jpg)
Numbers as Sequences of Operations
• Signed binary system:
.01 1
1] 1,- [ Interval Base
2Base 1} 0, ,1 {Digits
1.0
![Page 40: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/40.jpg)
Numbers as Sequences of Operations
• A number such ascorresponds to:
.0
=Left half =Middle half =Right half
L M R
1 1 0 101R R ML M L
1 10
![Page 41: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/41.jpg)
Numbers as Sequences of Operations
.0
L M R
1 1 0 101R R ML M L
=Left half =Middle half =Right half
1 10
• A number such ascorresponds to:
![Page 42: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/42.jpg)
Numbers as Sequences of Operations
.0
L M R
1 1 0 101R R ML M L
=Left half =Middle half =Right half
1 10
2
1
• A number such ascorresponds to:
![Page 43: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/43.jpg)
Numbers as Sequences of Operations
.0
L M R
1 1 0 101R R ML M L
=Left half =Middle half =Right half
1 10
2
1
4
3
• A number such ascorresponds to:
![Page 44: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/44.jpg)
Numbers as Sequences of Operations
2
1:
2:
2
1:
xxR
xxM
xxL
• Mathematically:
.0
=Left half =Middle half =Right half
L M R
1 1 0 101R R ML M L
1 10
• A number such ascorresponds to:
![Page 45: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/45.jpg)
Numbers as Sequences of Operations
• are affine maps, special case of linear fractional transformations of the form:
represented by:
dbx
caxx
db
ca
• Sequences of these operations give a general representation for numbers.
RML ,,
![Page 46: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/46.jpg)
Numbers as Sequences of Operations
61
10
61
10
51
712 2
![Page 47: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/47.jpg)
Numbers as Sequences of Operations
51
71
5.12
3
333.13
4
2
61
10
61
102
![Page 48: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/48.jpg)
Numbers as Sequences of Operations
51
712
61
10
61
104167.1
12
17
4117.117
24
22
![Page 49: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/49.jpg)
Numbers as Sequences of Operations
51
712 2
61
10
61
10
4141.199
140
4143.170
99
![Page 50: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/50.jpg)
Numbers as Sequences of Operations
153
135
40
31
10
22
![Page 51: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/51.jpg)
Numbers as Sequences of Operations
10
224
0
153
135
40
31
![Page 52: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/52.jpg)
Numbers as Sequences of Operations
10
22
153
135
40
314
3
![Page 53: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/53.jpg)
Numbers as Sequences of Operations
10
22
153
135
40
31
3
167.36
19
![Page 54: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/54.jpg)
Numbers as Sequences of Operations
101
10
61
10
11
31e e
![Page 55: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/55.jpg)
Numbers as Sequences of Operations
11
31
2
e
101
10
61
10e
![Page 56: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/56.jpg)
Numbers as Sequences of Operations
11
31e
101
10
61
1075.2
4
11
666.23
8
e
![Page 57: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/57.jpg)
Numbers as Sequences of Operations
11
31e e
101
10
61
10
7179.239
106
7188.232
87
![Page 58: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/58.jpg)
Basic Arithmetic Operations
• Use linear fractional transformations with two entries
represented by:
hfydxbxy
geycxaxyyx
),(
hfdb
geca
• For example, addition uses:
1000
0110
yxyx ),(
![Page 59: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/59.jpg)
Addition
e
1000
0110
e
e
![Page 60: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/60.jpg)
e
1000
0110
10
22
153
135
40
31
11
31
101
10
61
10
e
Addition
![Page 61: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/61.jpg)
e
1000
0110
10
22
153
135
40
31
11
31
101
10
61
10
2
e
Addition
![Page 62: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/62.jpg)
e
1000
0110
10
22
153
135
40
31
11
31
101
10
61
10
666.53
17
75.64
27
e
Addition
![Page 63: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/63.jpg)
e
1000
0110
10
22
153
135
40
31
11
31
101
10
61
10
e717.5
39
223
885.596
565
Addition
![Page 64: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/64.jpg)
• sin x, cos x, tan x, ex, log x, etc.
Elementary Functions
• A C-library for computing elementary functions is on the WWW.
• Each of them is computed by a composition of Linear Fractional Transformations presented as a binary tree.
![Page 65: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/65.jpg)
Elementary Functions
tan
1001
0010
3001
0010
5001
0010
x
x
x
x
![Page 66: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/66.jpg)
Elementary Functions
124
115
153
135
71
201
tan
1001
0010
3001
0010
5001
0010
1
1
1
1
![Page 67: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/67.jpg)
Elementary Functions
tan
1001
0010
5001
0010
1
153
135
124
115
71
20
153
135
124
115
71
20
153
135
124
115
3001
0010
71
20
1
tan
![Page 68: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/68.jpg)
Elementary Functions
tan
1001
0010
5001
0010
1
153
135
124
115
71
20
153
135
124
115
71
20
153
135
124
115
3001
0010
71
20
222.09
2
4.05
2
1
tan
![Page 69: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/69.jpg)
Elementary Functions
tan
1001
0010
3001
0010
5001
0010
1
71
20
153
135
124
115
71
20
153
135
124
115
71
20
153
135
124
115
1
tan
324.0907
294
347.0101
35
![Page 70: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/70.jpg)
Domain of Intervals
• Dana Scott introduced domain theory in 1970 as a mathematical model of programming languages.
• Domain theory found applications in numerical computation in 1990’s.
]1 ,1[
1 10 1
More information
![Page 71: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/71.jpg)
• Correct geometric algorithms become unreliable when implemented in floating point.
Solid Modelling / Computational Geometry
• Manufactured objects are generally modelled with CAD, a package for solid and geometric modelling.
![Page 72: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/72.jpg)
1L
2LP
• With floating point arithmetic, find the point P of the intersection of L1 and L2. Then:
minimum_distance(P, L1) > 0 minimum_distance(P, L2) > 0
Solid Modelling / Computational Geometry
![Page 73: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/73.jpg)
The Convex Hull Algorithm A, B & C nearly collinear A
B
C
With floating point we can get:
![Page 74: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/74.jpg)
A, B & C nearly collinear
The Convex Hull Algorithm
A
B
C
With floating point we can get:
(i) AC, or
![Page 75: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/75.jpg)
A, B & C nearly collinear
The Convex Hull Algorithm
A
B
C
With floating point we can get:
(i) AC, or(ii) just AB, or
![Page 76: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/76.jpg)
A, B & C nearly collinear
The Convex Hull Algorithm
A
B
C
With floating point we can get:
(i) AC, or(ii) just AB, or(iii) just BC, or
![Page 77: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/77.jpg)
A, B & C nearly collinear
With floating point we can get:
(i) AC, or(ii) just AB, or(iii) just BC, or(iv) none of them.
The quest for robust algorithms is the most fundamental unresolved problem in solid modelling and computational geometry.
The Convex Hull Algorithm
A
B
C
![Page 78: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/78.jpg)
• The basic building blocks of classical geometry are not continuous and hence not computable.
A Fundamental Problem
True
x
• Example: The point x is in the box.
![Page 79: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/79.jpg)
x
False
• The basic building blocks of classical geometry are not continuous and hence not computable.
A Fundamental Problem
• Example: The point x is in the box.
![Page 80: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/80.jpg)
• There is a discontinuity if x goes through the boundary.
x
A Fundamental Problem
• This predicate is not computable:
x If x is on the boundary, we cannot determine if it is in or out at any finite stage.
FalseTrue
![Page 81: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/81.jpg)
Intersection of Two Cubes
![Page 82: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/82.jpg)
Intersection of Two Cubes
![Page 83: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/83.jpg)
• Topology and geometry have been developed to study continuous functions and transformations on spaces.
This is Really Ironical !
• The membership predicate and the intersection operation are the fundamental building blocks of topology and geometry.
• Yet, these basic elements are not continuous in classical topology and geometry.
![Page 84: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/84.jpg)
Foundation of a Computable Geometry
• Reconsider the membership predicate:
box theofboundary on the is if
box theofexterior in the is ifFalse
box theofinterior in the is ifTrue
x
x
x
x
True False
![Page 85: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/85.jpg)
A Three-Valued Logic
True False
• A domain observable observable
not observable
It is called B with its Scott topology.
![Page 86: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/86.jpg)
Computing a Solid Object
• In this model, a solid object is represented by its interior and exterior,
• Mathematically, a solid object is given by a continuous function from
the Euclidean space to
B
each approximated by a nested sequence of rational polyhedra.
![Page 87: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/87.jpg)
Computing a Solid Object• Kashani’s computation of
![Page 88: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/88.jpg)
Computable Predicates & Operations
• This gives a model for geometry and topology in which all the basic building blocks (membership, intersection, union) are continuous and computable.
• In practice, a geometric object is approximated by two rational polyhedra, one inside and one outside, so that the area between them is as small as desired.
![Page 89: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/89.jpg)
The Convex Hull Algorithm
![Page 90: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/90.jpg)
The Convex Hull Algorithm
![Page 91: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/91.jpg)
The Convex Hull Algorithm
![Page 92: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/92.jpg)
The Convex Hull Algorithm
The inner and outer convex hulls can be computed by a robust Nlog N algorithm i.e. with the same complexity as the non-robust classical algorithms.
![Page 93: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/93.jpg)
Calculating the Number of Holes
• For a computable solid with computable volume, one can calculate the number of holes with volume greater than any desired value.
• In mathematical terms, this model enables us to study the computability or decidability of various homotopic properties of solids.
1 hole 19 holes2 holes
![Page 94: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/94.jpg)
The Riemann Integral
0 1
Integral = Area
![Page 95: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/95.jpg)
0 1
The Riemann Integral
![Page 96: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/96.jpg)
0 1
The Riemann Integral
![Page 97: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/97.jpg)
0 1
The Riemann Integral
![Page 98: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/98.jpg)
0 1
This method can be extended using domain theory to more general distributions on more general spaces.
The Riemann Integral
![Page 99: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/99.jpg)
The Generalized Riemann Integral
• The generalized Riemann integral has been applied to compute physical quantities in chaotic systems:
• The physical quantities of the 1-dimensional random field Ising model.
• Feigenbaum map on the route to chaos:
cxx 2
2 25.0 25.0
c
attractor
c
![Page 100: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/100.jpg)
The Real and Solid
People
![Page 101: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/101.jpg)
The Long Journey
Diophantus3rdc. AD
Brahmagupta, 598 ADSridhara, 850 AD
Adelard 1080 AD
House of Wisdom9thc. AD
Khwarizmi780 AD
Kashani1380 AD
![Page 102: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/102.jpg)
The Moral of Our Story
• The ever increasing power of computer technology enables us to perform exact computation efficiently, in the spirit of Kashani.
• People from many nations have contributed to the present achievements of science and technology.
• History has imposed a reversal of fortune: Nations who developed the foundation of our present computer revolution in the very dark ages of Europe, later experienced a much stifled development.
• The Internet can be a global equaliser if, and only if, we make it available to the youth of the developing countries.
![Page 103: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/103.jpg)
Empowering the Youth in the Developing World
• Science and Arts Foundation was launched in March 1999 at Imperial College:• To provide Computer/Internet Sites for school children and students in the Developing World .• To establish Internet incubators.
![Page 104: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/104.jpg)
THE END
![Page 105: Doing it without Floating Real and Solid Computing Abbas Edalat.](https://reader030.fdocuments.us/reader030/viewer/2022032723/56649d045503460f949d78dc/html5/thumbnails/105.jpg)