![]() ![]() | ![]() |
File: [local] / OpenXM_contrib / PHC / Ada / Math_Lib / Numbers / multprec_complex_number_tools.adb (download)
Revision 1.1.1.1 (vendor branch), Sun Oct 29 17:45:26 2000 UTC (23 years, 10 months ago) by maekawa
Import the second public release of PHCpack. OKed by Jan Verschelde. |
with Standard_Floating_Numbers; use Standard_Floating_Numbers; with Multprec_Floating_Numbers; use Multprec_Floating_Numbers; package body Multprec_Complex_Number_Tools is function Create ( c : Standard_Complex_Numbers.Complex_Number ) return Multprec_Complex_Numbers.Complex_Number is cre : double_float := Standard_Complex_Numbers.REAL_PART(c); cim : double_float := Standard_Complex_Numbers.IMAG_PART(c); rre : Floating_Number := Multprec_Floating_Numbers.Create(cre); rim : Floating_Number := Multprec_Floating_Numbers.Create(cim); res : Multprec_Complex_Numbers.Complex_Number := Multprec_Complex_Numbers.Create(rre,rim); begin Clear(rre); Clear(rim); return res; end Create; procedure Set_Size ( c : in out Multprec_Complex_Numbers.Complex_Number; size : in natural ) is cre : Floating_Number := Multprec_Complex_Numbers.REAL_PART(c); cim : Floating_Number := Multprec_Complex_Numbers.IMAG_PART(c); begin Set_Size(cre,size); Set_Size(cim,size); Multprec_Complex_Numbers.Clear(c); c := Multprec_Complex_Numbers.Create(cre,cim); Clear(cre); Clear(cim); end Set_Size; end Multprec_Complex_Number_Tools;