VB高精度除法
高精度除法,是要整数部分和小数部分分开求吗。难吐我了,有些地方一直卡着。
Function div_high_sigle(a As Long, b As Long) As String Dim i As Long, j As Long, k As Long, c As String k = Int(a / b) j = a Mod b c = k & "." While i < 200 j = j * 10 While j < b c = c & "0" j = j * 10 i = i + 1 Wend c = c & Int(j / b) j = j Mod b i = i + 1 Wend div_high_sigle = c End Function Private Sub Command1_Click() Text1 = "" Text1 = div_high_sigle(1, 49) MsgBox Len(Text1) End Sub
[此贴子已经被作者于2020-4-25 21:06编辑过]