1樓:匿名使用者
用反三角函式拉
給你定義了一下
'secant
public function sec(byval number as double) as double
sec = 1 / cos(number)
end function
'cosecant
public function csc(byval number as double) as double
csc = 1 / sin(number)
end function
'cotangent
public function ctn(byval number as double) as double
ctn = 1 / tan(number)
end function
'inverse sine
public function asin(byval number as double) as double
asin = atn(number / sqr(-number * number + 1))
end function
'inverse cosine
public function acos(byval number as double) as double
acos = atn(-number / sqr(-number * number + 1)) + 2 * atn(1)
end function
'inverse secant
public function asec(byval number as double) as double
asec = atn(number / sqr(number * number - 1)) + sgn((number) - 1) * (2 *
atn(1))
end function
'inverse cosecant
public function acsc(byval number as double) as double
acsc = atn(number / sqr(number * number - 1)) + (sgn(number) - 1) * (2 *
atn(1))
end function
'inverse cotangent
public function actn(byval number as double) as double
actn = atn(number) + 2 * atn(1)
end function
'hyperbolic sine
public function sinh(byval number as double) as double
sinh = (exp(number) - exp(-number)) / 2
end function
'hyperbolic cosine
public function cosh(byval number as double) as double
cosh = (exp(number) + exp(-number)) / 2
end function
'hyperbolic tangent
public function tanh(byval number as double) as double
tanh = (exp(number) - exp(-number)) / (exp(number) + exp(-number))
end function
'hyperbolic secant
public function sech(byval number as double) as double
sech = 2 / (exp(number) + exp(-number))
end function
'hyperbolic cosecant
public function csch(byval number as double) as double
csch = 2 / (exp(number) - exp(-number))
end function
'hyperbolic cotangent
public function ctnh(byval number as double) as double
ctnh = (exp(number) + exp(-number)) / (exp(number) - exp(-number))
end function
'inverse hyperbolic sine
public function asinh(byval number as double) as double
asinh = log(number + sqr(number * number + 1))
end function
'inverse hyperbolic cosine
public function acosh(byval number as double) as double
acosh = log(number + sqr(number * number - 1))
end function
'inverse hyperbolic tangent
public function atanh(byval number as double) as double
atanh = log((1 + number) / (1 - number)) / 2
end function
'inverse hyperbolic secant
public function asech(byval number as double) as double
asech = log((sqr(-number * number + 1) + 1) / number)
end function
'inverse hyperbolic cosecant
public function acsch(byval number as double) as double
acsch = log((sgn(number) * sqr(number * number + 1) + 1) / number)
end function
'inverse hyperbolic cotangent
public function actnh(byval number as double) as double
actnh = log((number + 1) / (number - 1)) / 2
end function
'logarithm to base n
public function logn(byval base as double, byval number as double)
logn = log(number) / log(base)
end function
'convert degrees to radians
public function degtorad(byval number as double) as double
degtorad = number * 1.74532925199433e-02 'pi/180
end function
'convert radians to degrees
public function radtodeg(byval number as double) as double
radtodeg = number * 57.2957795130824 ' 180/pi
end function
'asin(sin(x)) = x!!62616964757a686964616fe59b9ee7ad9431333236373163!
'好累呀!!
vb程式題,急!謝謝!編寫程式,從文字框輸入x與y的值,在第三個文字框中輸出結果:
2樓:
設text1和text2分別為x和y的輸入框,text3輸出結果,另有***mand1是計算按鈕。
在窗體代版碼「通權用」段編寫函式過程:
private function f(byval x as double, byval y as double) as double
select case x
case is > 0
if y > 0 then
f = log(x) + log(y)
else
f = sin(x) + sin(y)
end if
case else
f = sin(x) + cos(y)
end select
end function
'計算按鈕事件呼叫f:
private sub ***mand1_click()text3.text = f(val(text1.text), val(text2.text))
end sub
3樓:匿名使用者
有圖有真相,望採納。。。。
VB中,執行,Print2And3的結果為什麼是
數字的邏輯運來算是按二進位制位 算的,而不是把數字轉bai換成boolean型別再運du算。2 11111110 以8位為例,zhi16 32位什麼dao的前面補足0就行。3 11111101 注意前面的1基本都是符號位,運算結果是11111100,也就是 4。vb題,a 3,b 2,c 1,執行p...
VB中label控制項中的文字怎麼「垂直居中「呀
在vb中如text和label控制項是沒有垂直居中功能的,但是可以變通就是給文字加空行。加乙個 text1 乙個 mand1 636f707962616964757a686964616f31333337396235 dim aa as string,i as integer,jj as intege...
VB中25MOD32352的值是多少怎麼算
所以先分別計算11 3的結果得到3 11除以3的商是3吧。然後計算11 mod 3 得到2 11除以3的餘數 然後再計算 運算得到3 2 5 5 25 mod 3的值為 1 23 5 2先算5 2,再算23 10,值為 2 最後結果 1 2 3 5 2 10 23 10 2,25 mod 3 1,1...