VB中exp的返回值为0我想做这样一个表达式:b=exp(a*10)结果b=0,a定义为double.请问如何修改?Private Sub cmdOk_Click()Dim uc As Doubler = Text1.Textc = Text2.Textl = Text3.Textus = Text4.Textdelta = r * r * c * c - 4 * l * cIf de
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/15 11:17:19
VB中exp的返回值为0我想做这样一个表达式:b=exp(a*10)结果b=0,a定义为double.请问如何修改?Private Sub cmdOk_Click()Dim uc As Doubler = Text1.Textc = Text2.Textl = Text3.Textus = Text4.Textdelta = r * r * c * c - 4 * l * cIf de
VB中exp的返回值为0
我想做这样一个表达式:
b=exp(a*10)
结果b=0,a定义为double.
请问如何修改?
Private Sub cmdOk_Click()
Dim uc As Double
r = Text1.Text
c = Text2.Text
l = Text3.Text
us = Text4.Text
delta = r * r * c * c - 4 * l * c
If delta > 0 Then
r1 = (-r * c + Sqr(delta)) / 2 / l / c
r2 = (-r * c - Sqr(delta)) / 2 / l / c
a1 = r2 * us / (r2 - r1)
a2 = -r1 * us / (r2 - r1)
uc = a1 * Exp(r1 * 10)
Label3.Caption = uc
输出uc为0
VB中exp的返回值为0我想做这样一个表达式:b=exp(a*10)结果b=0,a定义为double.请问如何修改?Private Sub cmdOk_Click()Dim uc As Doubler = Text1.Textc = Text2.Textl = Text3.Textus = Text4.Textdelta = r * r * c * c - 4 * l * cIf de
要有完整代码(至少也要有前后10多行代码)才能分析原因.否则就像“管中窥豹”,神仙也帮不了你.