September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
|
|
@ -0,0 +1,16 @@
|
|||
function f(atom x)
|
||||
return sqrt(abs(x))+5*power(x,3)
|
||||
end function
|
||||
|
||||
string s = substitute(prompt_string("Enter 11 numbers:"),","," ")
|
||||
sequence S = scanf(s,"%f %f %f %f %f %f %f %f %f %f %f")
|
||||
if length(S)!=1 then puts(1,"not 11 numbers") abort(0) end if
|
||||
S = reverse(S[1])
|
||||
for i=1 to length(S) do
|
||||
atom result = f(S[i])
|
||||
if result>400 then
|
||||
printf(1,"f(%g):overflow\n",{S[i]})
|
||||
else
|
||||
printf(1,"f(%g):%g\n",{S[i],result})
|
||||
end if
|
||||
end for
|
||||
Loading…
Add table
Add a link
Reference in a new issue