archive-com.com » COM » E » EFG2.COM Total: 878 Choose link from "Titles, links and description words view": Or switch to
"Titles and links view". |

like deltaforce dune 2000 anno 1602 after the dll is projected into the process an error occurs and the whole shit is fucked up the error is always after an fpu command This is a known problem with applications that use the OpenGL framework for example OpenGL in Win9x has some bugs that cause floating point errors The FPU error mask used by Microsoft compilers hides these errors the one

Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/0427b.txt (2016-02-14)

Open archived version from archive

integers efg 26 January 1985 See p 12 of Algorithms by Robert Sedgewick Sample Data Input 1128 1272 Output 24 VAR x y INTEGER FUNCTION gcd u v INTEGER INTEGER VAR t INTEGER BEGIN WHILE v 0 AND ABS y

Original URL path: http://www.efg2.com/Lab/Library/Delphi/MathFunctions/euclid.txt (2016-02-14)

Open archived version from archive

p 19 of Fundamentals of Computer Algorithms Horowitz and Sahni Sample Data Input 1128 1272 Output 24 VAR x y INTEGER FUNCTION gcd a b INTEGER INTEGER VAR t INTEGER BEGIN IF b 0 THEN gcd a use RESULT a in Delphi efg Oct 2000 ELSE gcd gcd b a MOD b use RESULT gcd b a MOD b END gcd BEGIN REPEAT WRITELN Enter two numbers 0s to quit

Original URL path: http://www.efg2.com/Lab/Library/Delphi/MathFunctions/euclidr.txt (2016-02-14)

Open archived version from archive

slower Damn I realized my second routine had the same problem as xchg a faster better Pentium Pro II routine is Procedure Swap32c Var LongVar LongInt Assembler Asm mov esi longvar xor eax eax mov ax esi xor edx edx mov dx esi 2 mov esi dh mov esi 1 dl mov esi 2 ah mov esi 3 al End Swap32 Actually there are clock penalties for addressing the same

Original URL path: http://www.efg2.com/Lab/Library/UseNet/1997/1121.txt (2016-02-14)

Open archived version from archive

the accuracy by letting the integer math for the exponent spill over into the mantissa and thus get a form of interpolation Pretty nifty I ve converted it to basm quite a bit faster than the pascal on a PII and also came up with some ancillary routines for a sigmoid division and natural log Here they are comments and tweaks encouraged dxxx is a double based version fxxx is a single based version const ln2 0 693147181 dexpA double 100000 ln2 2 20 ln2 dlnA double ln2 100000 fexpA double 800000 ln2 2 23 ln2 flnA double ln2 800000 fexpC 545947 flnC 545947 dexpC 68243 fnexpA double 800000 ln2 2 23 ln2 fone single 1 fdivA single 1 function dexp x single double var y double asm fld x fmul dexpA fistp dword ptr y 4 mov dword ptr y 0 0 add dword ptr y 4 3FF00000 dExpC fld y end function dln x double double asm sub dword ptr x 4 3FF00000 dExpC fild dword ptr x 4 fmul dlnA end function fexp x single double 10x faster asm fld x fmul fexpA fistp dword ptr x add dword ptr x 3F800000 fExpC fld x end function fexp1 var x single double special case when x can be prevented from being pushed on the stack 14 5x faster asm fld dword ptr eax fmul fexpA fistp dword ptr esp 4 add dword ptr esp 4 3F800000 fExpC fld dword ptr esp 4 end function fln x single double 7x faster very poor accuracy as x 1 0 asm sub dword ptr x 3F800000 flnC fild dword ptr x fmul flnA end function fdiv x single single 20 faster in some circumstances var y single asm sub dword ptr x 3F800000 flnC fild dword ptr x fmul fdivA

Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1214a.txt (2016-02-14)

Open archived version from archive

abs SinVal 1 And you may need Pi that See for example which includes the following and methods using ArcTan but not asm which appear to be correct both for BP7 and for D3 IFDEF TjM Adapted From Terje Mathisen Date Tue 30 Apr 1996 15 33 26 0200 o tan y sin y cos y o tan y sqrt 1 cos y 2 cos y o so arccos x FPATAN sqrt 1 x 2 x function ArcCos2 x extended extended assembler asm fld x X fld st 0 X X fmul st st 0 X 2 X fld1 1 X 2 X fsubrp st 1 st 1 X 2 X FSQRT sqrt 1 X 2 X fxch st 1 X sqrt 1 X 2 fpatan Uses both arguments end ArcCos2 function ArcSin2 x extended extended assembler asm fld x X fld st 0 X X fmul st st 0 X 2 X fld1 1 X 2 X fsubrp st 1 st 1 X 2 X FSQRT sqrt 1 X 2 X fpatan Uses both arguments end ArcSin2 It is possible that the FSUB instruction should have been FSUBP instead of FSUBRP and you might need to interpose an FXCH ST 1 between the last two instructions but otherwise it should work Terje Mathisen hda hydro com ENDIF TjM IFDEF PZa From Paul Zank function ArcTan2 y extended x extended extended The 87 287 387 i486 and i586 have an op code to do ATAN2 It is advertised to be well behaved and execute in 290 cycles on a i486 This would be about 3 uSec on a 100MHz i486 machine It is also supposed to be very accurate More information can be found in the i486 Microprocessor Programmers Reference Manual assembler asm fld y fld x fpatan end function

Original URL path: http://www.efg2.com/Lab/Library/UseNet/1999/1128.txt (2016-02-14)

Open archived version from archive

objectpascal 224242 Ben Crain wrote D5 s math unit correctly returns sin 1E18 but not sin 1E19 or above Why not The specs for the 387 FPU says that for the sine function the magnitude of the input cannot exceed 2 63 which is about 9 22337E 18 The 387 is similar to the Pentium FPU and both are based on specification IEEE 754 Also of note is that the

Original URL path: http://www.efg2.com/Lab/Library/UseNet/2002/0117.txt (2016-02-14)

Open archived version from archive

Pred Digits const Pattern array 0 9 of string 4 x xx xxx xy y yx yxx yxxx xz const DecXlatn array Decades of array x z of char IVX XLC CDM Mvx xlc cdm m var DigitNum byte CharNumb byte NumStr string 10 ChrPattn string 4 PartRomn string 4 begin RESULT NumStr IntToStr Number if Length NumStr Digits then RESULT Too Big else begin for DigitNum 1 to Length

Original URL path: http://www.efg2.com/Lab/Library/Delphi/MathFunctions/roman.txt (2016-02-14)

Open archived version from archive