Search found 1918 matches

by srvaldez
Mar 13, 2007 0:51
Forum: General
Topic: hexadecimal
Replies: 13
Views: 1928

Code: Select all

Union doubleh
    As ULongInt di
    As Double dh
End Union

Function rHex(Byref x As doubleh) As String
    Return Hex(x.di)
End Function

Dim as doubleh x
x.dh=3.1415926535897932384626433832795
print rHex(x)

Print "press Return to End ";
Sleep
by srvaldez
Feb 28, 2007 14:40
Forum: Beginners
Topic: LCM
Replies: 4
Views: 955

I downloaded the lates FB-CVS version but get an error of mismatched arguments here: type fraction '' used to build a step var declare constructor( byval n as integer, byval d as integer ) '' implicit step versions declare operator for ( ) declare operator step( ) declare ope...
by srvaldez
Feb 28, 2007 12:36
Forum: Beginners
Topic: LCM
Replies: 4
Views: 955

Function GCD(Byval n As Integer, Byval m As Integer) As Integer     Dim As Integer t         While m <> 0                 t = m                 m = n Mod m                 n = t         Wend     Return n End Function Function LCM(Byval n As Integer, Byval m As Integer) As Integer   ...
by srvaldez
Feb 10, 2007 20:18
Forum: Tips and Tricks
Topic: MARS Encrytion Algorithm
Replies: 12
Views: 7083

I find that programs that have comments for each line rather distracting and hard to follow, I prefer comments at the beginning of a block or function and occasionally for a line that does something obscure.
by srvaldez
Jan 13, 2007 18:30
Forum: Beginners
Topic: gcc intel-asm output, how?
Replies: 2
Views: 898

thanks :)
by srvaldez
Jan 13, 2007 17:52
Forum: Beginners
Topic: gcc intel-asm output, how?
Replies: 2
Views: 898

gcc intel-asm output, how?

I need to know how to get gcc to output asm in intel format, any help is much appreciated.
by srvaldez
Jan 05, 2007 2:17
Forum: Beginners
Topic: fractions
Replies: 9
Views: 1641

to reduce a fraction to lowest terms divide both the numerator and denominator by gcd(numerator,denominator), example. Function gcd(Byval n As Integer, Byval m As Integer) As Integer Dim As Integer t While m <> 0 t = m m = n Mod m n = t Wend Return n End Function suppose you have the fractio...
by srvaldez
Jan 01, 2007 22:59
Forum: General
Topic: I need for FreeSpeedRacer fast trig. math
Replies: 7
Views: 1449

here's something that may help http://www.bmath.net/bmath/index.html
by srvaldez
Oct 01, 2006 2:16
Forum: General
Topic: Library using extended FP format?
Replies: 13
Views: 7647

thanks v1ctor, the changes you made are awsome, I can sure learn from that. :)
by srvaldez
Oct 01, 2006 1:28
Forum: General
Topic: Library using extended FP format?
Replies: 13
Views: 7647

v1ctor wrote:That's a lot of work, ok if i add that as an operator overloading example to the FB package? All credits will be given. Thanks.

I am flattered v1ctor, but yes you are welcome to include in the examples, although some code needs a bit of cleaning up. :)
by srvaldez
Sep 30, 2006 4:38
Forum: General
Topic: Library using extended FP format?
Replies: 13
Views: 7647

the post is too long, append this part to the first part. Declare Function cext Overload ( Byval lhs As ext ) As ext Declare Function cext ( Byval lhs As Integer ) As ext Declare Function cext ( Byval lhs As Single ) As ext Declare Function cext ( Byval lhs As Double )...
by srvaldez
Sep 30, 2006 2:28
Forum: General
Topic: Library using extended FP format?
Replies: 13
Views: 7647

operator overloading, not extensivly tested. the post is too long, here's part 1 append the second part at the end of part 1 'some real10 routines by srvaldez 'placed into the public domain, use any way you want UNION ext As Integer fl(3) As Ushort fw(7) As ubyte tb(15) Decla...
by srvaldez
Sep 29, 2006 23:47
Forum: General
Topic: Library using extended FP format?
Replies: 13
Views: 7647

yes, that was my next step. :)
by srvaldez
Sep 29, 2006 23:35
Forum: General
Topic: Library using extended FP format?
Replies: 13
Views: 7647

yes, but the GNU compilers support the extended format and I was refering to the GNU lib, but I should have been more specific.
by srvaldez
Sep 29, 2006 22:46
Forum: General
Topic: Library using extended FP format?
Replies: 13
Views: 7647

I think CRT lib has extended precision functions but not sure, I will look into it, but in the mean time you can play with this,. NOTE: the input/output functions are not 100% debuged yet. 'some real10 routines by srvaldez 'placed into the public domain, use any way you want UNION ext As Integer fl&...

Go to advanced search