Exp=f
@p1=
@c1=
@p2=
@c2=
@va=a
@vb=b
@vc=c
@vd=d
@end
                                                       
'DDivide:
'Ŀģ
'aҪı1
'bҪı2
'ؽ˺Ľ
'LastError=0ȷLastErrorΪμֲ
Public Function DDivide(ByVal ina As Double,ByVal  inb As Double) As Double
	 '//칤ɵļܺļܱʽ
    '//бܵıʽΪ@exp
	Dim OutArray(16) As Byte
    Dim InArray(16) As Byte
	InArray(0) = @ak100: InArray(1) = @ak101: InArray(2) = @ak102: InArray(3) = @ak103
	InArray(4) = @ak104: InArray(5) = @ak105: InArray(6) = @ak106: InArray(7) = @ak107
	InArray(8) = @ak108: InArray(9) = @ak109: InArray(10) = @ak110: InArray(11) = @ak111
	InArray(12) = @ak112: InArray(13) = @ak113: InArray(14) = @ak114: InArray(15) = @ak115
    '//ܺıʽ͵ннܲ¼ܣʹӦȨţעת
    '//Ȼ󷵻ؼܺݣüܺüӦ
    '//ֻбӦȨŽתݲܱӦļܲ
	LastError=E_Dec_6(E_Hkey, E_Lkey, InArray, OutArray, KeyPath)
    If  LastError<> 0 Then  Exit Function
	'/////////////////////////////////////////////////////////////////////////////////////////////////////
   Dim temp_double(8) As Byte
    Dim result  As Integer 'ֲ,ؽ
   'ֲ
    Dim a As Integer
    Dim b As Integer
    Dim c As Integer
    Dim d As Integer
    
    'inaֽΪֽ
   CopyMemory temp_double(0), ina, 8
   a = temp_double(0): b = temp_double(1): c = temp_double(2): d = temp_double(3)
   result = CalculateEx_2(OutArray, a, b, c, d, KeyPath, 16, 2000)
  @1
  If (result <> 0) Then
        LastError = result 'ô
        DDivide = 0
        Exit Function
  End If
    temp_double(0) = a: temp_double(1) = b: temp_double(2) = c: temp_double(3) = d
    Dim outa As Double
    'ٽϲΪһ
    CopyMemory outa, temp_double(0), 8
    
    'inbֽΪֽ
    CopyMemory temp_double(0), inb, 8
   a = temp_double(4): b = temp_double(5): c = temp_double(6): d = temp_double(7)
   result = CalculateEx_2(OutArray, a, b, c, d, KeyPath, 16, 2000)
    @1
    
    If (result <> 0) Then
        LastError = result 'ô
        DDivide = 0
        Exit Function
    End If
    temp_double(4) = a: temp_double(5) = b: temp_double(6) = c: temp_double(7) = d
    Dim outb As Double
    'ٽϲΪһ
    CopyMemory outb, temp_double(0), 8
    
     DDivide = outa / outb

End Function
