السلام عليكم ورحمه الله وبركاته …
ممكن أريد منكم كتابه كود لهذه المسائله …جزاكم الله خيراااا
[FONT=Times-Roman][SIZE=2]One way to compute the exponential function
[/size][/font]e^xis to truncate its Taylor
[LEFT]series expansion around [/left]
[SIZE=2][FONT=Times-Roman]
[LEFT][/font][/size]x = 0,
…+e^x=1+x+(1/2!)x^2[/left]
[LEFT]Unfortunately, many terms are required for accuracy if [/left]
[SIZE=2][FONT=Times-Roman]
[/font][/size]|x| is large. But
[LEFT]a special property of the exponential is that e^2x[/left]
[SIZE=2][FONT=Times-Roman]
[LEFT][/font][/size]= (ex )^2. This leads to a
scaling and squaring [/left]
[FONT=Times-Italic][SIZE=2]
[LEFT][/size][/font]method: Divide x by 2 repeatedly until |x| < 1/2,
use
result repeatedly. Write a function
[/left]
[SIZE=2][FONT=Times-Roman]
[/font][/size]expss(x) that performs these three
[LEFT]steps. (The functions [/left]
[SIZE=2][FONT=Times-Roman]
the Taylor expansion.) Test your function on x values −30, −3, 3, 30.[FONT=Times-Roman][SIZE=2]
[/size][/font]