hw1 done. Added .gitignore

This commit is contained in:
Claudio Maggioni 2020-03-04 09:09:11 +01:00
parent 817b757a11
commit 59dbdd99ee
5 changed files with 140 additions and 190 deletions

156
.gitignore vendored
View File

@ -1,33 +1,143 @@
# ---> MATLAB
# Windows default autosave extension
*.asv
*.ijvm
*.mic1
# OSX / *nix default autosave extension
*.m~
# ---> TeX
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
# Compiled MEX binaries (all platforms)
*.mex*
## Intermediate documents:
*.dvi
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
# Packaged app and toolbox files
*.mlappinstall
*.mltbx
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.brf
*.run.xml
# Generated helpsearch folders
helpsearch*/
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
# Simulink code generation folders
slprj/
sccprj/
## Auxiliary and intermediate files from other packages:
# Matlab code generation folders
codegen/
# Simulink autosave extension
*.autosave
# algorithms
*.alg
*.loa
# Simulink cache files
*.slxc
# achemso
acs-*.bib
# Octave session info
octave-workspace
# amsthm
*.thm
# beamer
*.nav
*.snm
*.vrb
#(e)ledmac/(e)ledpar
*.end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
# gnuplottex
*-gnuplottex-*
# hyperref
*.brf
# knitr
*-concordance.tex
*.tikz
*-tikzDictionary
# listings
*.lol
# makeidx
*.idx
*.ilg
*.ind
*.ist
# minitoc
*.maf
*.mtc
*.mtc[0-9]
*.mtc[1-9][0-9]
# minted
_minted*
*.pyg
# morewrites
*.mw
# mylatexformat
*.fmt
# nomencl
*.nlo
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# xindy
*.xdy
# WinEdt
*.bak
*.sav
# Mac stupid tmp files
.DS_Store

View File

@ -1 +0,0 @@
\relax

View File

@ -1,165 +0,0 @@
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2018) (preloaded format=pdflatex 2019.1.23) 3 MAR 2020 21:53
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
**hw1.tex
(./hw1.tex
LaTeX2e <2018-04-01> patch level 2
Babel <3.18> and hyphenation patterns for 84 language(s) loaded.
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/article.cls
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/base/inputenc.sty
Package: inputenc 2018/04/06 v1.3b Input encoding file
\inpenc@prehook=\toks14
\inpenc@posthook=\toks15
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/geometry/geometry.sty
Package: geometry 2018/03/24 v5.7 Page Geometry
(/usr/local/texlive/2018/texmf-dist/tex/latex/graphics/keyval.sty
Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
\KV@toks@=\toks16
)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifpdf.sty
Package: ifpdf 2017/03/15 v3.2 Provides the ifpdf switch
)
(/usr/local/texlive/2018/texmf-dist/tex/generic/oberdiek/ifvtex.sty
Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
Package ifvtex Info: VTeX not detected.
)
(/usr/local/texlive/2018/texmf-dist/tex/generic/ifxetex/ifxetex.sty
Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
)
\Gm@cnth=\count88
\Gm@cntv=\count89
\c@Gm@tempcnt=\count90
\Gm@bindingoffset=\dimen103
\Gm@wd@mp=\dimen104
\Gm@odd@mp=\dimen105
\Gm@even@mp=\dimen106
\Gm@layoutwidth=\dimen107
\Gm@layoutheight=\dimen108
\Gm@layouthoffset=\dimen109
\Gm@layoutvoffset=\dimen110
\Gm@dimlist=\toks17
)
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amstext.sty
Package: amstext 2000/06/29 v2.01 AMS text
(/usr/local/texlive/2018/texmf-dist/tex/latex/amsmath/amsgen.sty
File: amsgen.sty 1999/11/30 v2.0 generic functions
\@emptytoks=\toks18
\ex@=\dimen111
))
(/usr/local/texlive/2018/texmf-dist/tex/latex/tools/array.sty
Package: array 2018/04/07 v2.4g Tabular extension package (FMi)
\col@sep=\dimen112
\ar@mcellbox=\box26
\extrarowheight=\dimen113
\NC@list=\toks19
\extratabsurround=\skip43
\backup@length=\skip44
\ar@cellbox=\box27
) (./hw1.aux)
\openout1 = `hw1.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 13.
LaTeX Font Info: ... okay on input line 13.
*geometry* driver: auto-detecting
*geometry* detected driver: pdftex
*geometry* verbose mode - [ preamble ] result:
* driver: pdftex
* paper: <default>
* layout: <same size as paper>
* layoutoffset:(h,v)=(0.0pt,0.0pt)
* modes:
* h-part:(L,W,R)=(56.9055pt, 500.484pt, 56.9055pt)
* v-part:(T,H,B)=(56.9055pt, 681.15898pt, 56.9055pt)
* \paperwidth=614.295pt
* \paperheight=794.96999pt
* \textwidth=500.484pt
* \textheight=681.15898pt
* \oddsidemargin=-15.36449pt
* \evensidemargin=-15.36449pt
* \topmargin=-52.36449pt
* \headheight=12.0pt
* \headsep=25.0pt
* \topskip=12.0pt
* \footskip=30.0pt
* \marginparwidth=44.0pt
* \marginparsep=10.0pt
* \columnsep=10.0pt
* \skip\footins=10.8pt plus 4.0pt minus 2.0pt
* \hoffset=0.0pt
* \voffset=0.0pt
* \mag=1000
* \@twocolumnfalse
* \@twosidefalse
* \@mparswitchfalse
* \@reversemarginfalse
* (1in=72.27pt=25.4mm, 1cm=28.453pt)
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <14.4> on input line 14.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <7> on input line 14.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <12> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <8> on input line 17.
LaTeX Font Info: External font `cmex10' loaded for size
(Font) <6> on input line 17.
[1
{/usr/local/texlive/2018/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
[2] (./hw1.aux) )
Here is how much of TeX's memory you used:
880 strings out of 492649
12089 string characters out of 6129622
82377 words of memory out of 5000000
4806 multiletter control sequences out of 15000+600000
8501 words of font info for 30 fonts, out of 8000000 for 9000
1141 hyphenation exceptions out of 8191
24i,10n,32p,142b,176s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfont
s/cm/cmbx12.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts
/cm/cmmi12.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/
cm/cmmi8.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm
/cmr12.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/c
mr17.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmr
8.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10
.pfb></usr/local/texlive/2018/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy8.p
fb>
Output written on hw1.pdf (2 pages, 79760 bytes).
PDF statistics:
43 PDF objects out of 1000 (max. 8388607)
30 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)

Binary file not shown.

View File

@ -41,6 +41,7 @@ $$ f(100_f) = \frac{1}{1.00 * 10^2} - \frac{1}{(1.00 * 10^2) + 1} =
$$\approx (1.00 * 10^{-2}) - (0.99 * 10^{-2}) = 1.00 * 10^{-4} = 0.0001 $$
$$ g(100_f) = \frac{1}{(1.00 * 10^2) ((1.00 * 10^2) + 1)} = \frac{1}{1.00 * 10^2 * 1.01 * 10^2} \approx
(0.99 * 10^{-4}) = 0.000099$$
$$ f(1000_f) = \frac{1}{1.00 * 10^3} - \frac{1}{(1.00 * 10^3) + 1} \approx
(1.00 * 10^{-3}) - \frac{1}{1.00 * 10^3} =$$
$$= (1.00 * 10^{-3}) - (1.00 * 10^{-3}) = 0 $$
@ -54,6 +55,11 @@ $$ g(1000_f) = \frac{1}{(1.00 * 10^3) ((1.00 * 10^3) + 1)} \approx \frac{1}{1.00
f(100_f) & 9.\overline{9009} * 10^{-5} & 9.901 * 10^{-7} & 10^{-2} \\
g(100_f) & 9.\overline{9009} * 10^{-5} & 9.9 * 10^{-9} & 10^{-4} \\
f(1000_f) & 9.99 * 10^{-7} & 9.99 * 10^{-7} & 1 \\
f(1000_f) & 9.99 * 10^{-7} & 10^{-9} & 10^{-3} \\
g(1000_f) & 9.99 * 10^{-7} & 10^{-9} & 10^{-3} \\
\end{tabular}
\subsection*{Point d)}
$f(x)$ is clearly less accuratee than $g(x)$ when dealing with floating point numbers. This is largely due to the final
subtraction, since that amplifies approximation errors already introduced in the division $\frac{1}{x + 1}$. Also, the multiplication
in $\frac{1}{x (x + 1)}$ does not cause any approximation errors with the numbers tested, since the mantissa is always 1 and
the multiplication of the exponent part is always exact.
\end{document}