23/07/02 10:43:08.06 JgirVmNw.net
実装して実数値例を算出
f=\(p,q){
q=q-1
a = (p *(p + q) + sqrt(p^2* (p + q)^2 + 4* p^2))/(2* p)
b= -a +q +p
c= -p
d=1
c(a,b,c,d)
}
re=f(20,23)
re
prod(re)
sum(re)
[1] 42.02379604 -0.02379604 -20.00000000 1.00000000
[1] 20
[1] 23
re=f(1,1)
re
prod(re)
sum(re)
[1] 1.618034 -0.618034 -1.000000 1.000000
[1] 1
[1] 1