diff options
author | Karl Berry <karl@freefriends.org> | 2024-05-11 20:36:14 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2024-05-11 20:36:14 +0000 |
commit | c1550dd8735691b6aff1800ec1a50560c62d6a2f (patch) | |
tree | 24645f08ca60486c8c8f86b077f11eeaa800ef9f /Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex | |
parent | e2fc9a84bdc5487b71b32a3ec9f5a3a1c7df5695 (diff) |
proflycee (11may24)
git-svn-id: svn://tug.org/texlive/trunk@71235 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex index 5e1f246ab3f..ade88434c2c 100644 --- a/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex +++ b/Master/texmf-dist/tex/latex/proflycee/proflycee-tools-analyse.tex @@ -574,6 +574,36 @@ }% } +%===intégrale 'brute' +\NewDocumentCommand\CalcIntegrale{ s O{} D<>{50} m m m }{% + \xintdeffloatfunc varfct(x) := #4 ;% + \def\TmpNmU{\xinteval{(#3)-1}}% + \def\TmpRes{\xintfloateval{(#6-#5)/(6*(#3))*(2*add(varfct(#5+i*(#6-#5)/(#3)),i=1..\TmpNmU)+varfct(#5)+varfct(#6)+4*add(varfct(#5+(i+0.5)*(#6-#5)/(#3)), i=0..\TmpNmU))}}% + \IfStrEq{#2}{}% + {% + \IfBooleanTF{#1}{\num{\TmpRes}}{\TmpRes}% + }% + {% + \IfBooleanTF{#1}{\num{\xintfloateval{round(\TmpRes,#2)}}}{\xintfloateval{round(\TmpRes,#2)}}% + }% + \relax +} + +%===intégrale 'brute' +\NewDocumentCommand\ValeurMoyenneIntg{ s O{} D<>{50} m m m }{% + \xintdeffloatfunc varfct(x) := #4 ;% + \def\TmpNmU{\xinteval{(#3)-1}}% + \def\TmpRes{\xintfloateval{(1)/(6*(#3))*(2*add(varfct(#5+i*(#6-#5)/(#3)),i=1..\TmpNmU)+varfct(#5)+varfct(#6)+4*add(varfct(#5+(i+0.5)*(#6-#5)/(#3)), i=0..\TmpNmU))}}% + \IfStrEq{#2}{}% + {% + \IfBooleanTF{#1}{\num{\TmpRes}}{\TmpRes}% + }% + {% + \IfBooleanTF{#1}{\num{\xintfloateval{round(\TmpRes,#2)}}}{\xintfloateval{round(\TmpRes,#2)}}% + }% + \relax +} + %==intégrale tikz== \defKV[methodeintegrtkz]{% |