Homework, Material, and Software Manual for Math 4610
Single Precision Machine Epsilon Code
Double Precision Machine Epsilon Code
A01770306@ENG30310 ~/hw1_prob3
$ gcc -c smaceps.c
A01770306@ENG30310 ~/hw1_prob3
$ ar crv testLibrary *.o
a - smaceps.o
A01770306@ENG30310 ~/hw1_prob3
$ ranlib testLibrary
A01770306@ENG30310 ~/hw1_prob3
$ ls
main.c smaceps.c smaceps.h smaceps.o testLibrary
This was the input. I was on a computer in the Engineering computer lab.
program main
integer id, nthrds
integer omp_get_thread_num, comp_get_num_threads
C$OMP PARALLEL PRIVATE(id)
id = omp_get_thread_num()
print *, 'hello world from thread', id
C$OMP BARRIER
if(id .eq. 0) then
nthrds = omp_get_num_threads()
print *, 'There are', nthrds, ' threads!'
end if
C$OMP END PARALLEL
stop
end
This is the output
c hello world from thread 7
c hello world from thread 1
c hello world from thread 5
c hello world from thread 2
c hello world from thread 6
c hello world from thread 3
c hello world from thread 4
c hello world from thread 0
c There are 0 threads!
The Taylor Series expansions can be found on pages 1-3 on the HW1.pdf.
The Radius of Convergence for each of the series can be found on pages 4-6 of the HW1.pdf.
The Antiderivative Computations can be found on pages 7-9 of the HW1.pdf.
Quadratic Polynomial Root Finder
The solutions to the initial value problems can be found on pages 10-11 of the HW1.pdf.
In an article from Siam News, written by Nicholas Higham, the history of machine precision in computers is discussed. They talk about how computers only started with single precision and then double precision was introduced. Even with double precision it didn’t make things 100% better. The amount of memory saved by single precision helped it get faster than double precision. These computations became much faster when the Cell Processor for the Play Station 3 was created. As manufacturers continue to improve their precision for different problems/designs we have today half precision and quadruple precision have been introduced.
Source: Nicholas Higham, A Multiprecision World, Siam News, Oct. 2 2017, www.sinews.siam.org/Details-Page/a-multiprecision-world, Sept. 7 2018
The Graphs can be found on page 12 of the HW1.pdf.