Search found 347 matches

by Provoni
May 11, 2019 18:46
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 2716

Re: Need faster Exponentiate

double Fast_Pow(double a, double b) //fastpower originally developed by Martin Ankerl { int tmp = (*(1 + (int *)&a)); int tmp2 = (int)(b * (tmp - 1072632447) + 1072632447); double p = 0.0; *(1 + (int * )&p) = tmp2; //p = p * a / 2.71828F ; failed attempt to auto correct the accuracy return ...
by Provoni
May 11, 2019 18:32
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 2716

Re: Need faster Exponentiate

Here is a power approximation function that I found and converted: function powa1(byval a as double,byval b as double)as double dim as double rv,ln,am1 ln=log(a) am1=b-1.0 rv=a*ln*am1 ln*=ln am1*=am1 rv+=.5*a*ln*am1 rv+=a return rv end function I would like to convert this one to FreeBASIC https://m...
by Provoni
May 11, 2019 8:57
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 2716

Re: Need faster Exponentiate

Thanks dodicat, it is a noteworthy speed improvement for me.

I also found that using numbers like ^0.25, ^0.50, ^0.75, ^1.50 have almost no calculation cost with the standard Exponentiate function.
by Provoni
May 11, 2019 8:16
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 2716

Need faster Exponentiate

Hey all, I need a faster exponentiate for my program, is that possible, perhaps an approximation? Thanks https://www.freebasic.net/wiki/wikka.php?wakka=KeyPgOpExponentiate Test environment: 'test environment randomize timer screenres 640,480,32 dim as integer i,maxrn=10000000 dim as double o,rn(maxr...
by Provoni
Mar 13, 2019 7:59
Forum: Tips and Tricks
Topic: Fast uByte array to String routine
Replies: 21
Views: 9352

Re: Fast uByte array to String routine

'fb_stralloctempdescf()' , because normally reserved to a FB internal use only, does not verify the following rule: Despite the use of the descriptor, an implicit NULL character (Chr(0)) is added to the end of the string, to allow passing them to functions in external libraries with...
by Provoni
Mar 12, 2019 17:39
Forum: Tips and Tricks
Topic: Fast uByte array to String routine
Replies: 21
Views: 9352

Re: Fast uByte array to String routine

If this is off topic then feel free to move my post to a new topic. Problem with code: screenres 800,600,32 dim as short i dim as string s="12345" dim linedata as ubyte ptr linedata=strptr(s) print fb_stralloctempdescf(linedata[i],2) 'print only the first number = ok print valint(fb_strall...
by Provoni
Mar 06, 2019 17:06
Forum: Community Discussion
Topic: Getting blocked by Immunify360 while accessing the forum
Replies: 12
Views: 1299

Re: Getting blocked by Immunify360 while accessing the forum

caseih wrote:Brave new world where we turn everything over to algorithms.

Straight out of science fiction!

:-)

It never happened to me though.
by Provoni
Feb 20, 2019 7:49
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 46
Views: 5837

Re: Building FreeBASIC 1.06 Release

Thanks allot to CoderJeff and the FreeBASIC team and everyone else involved in 1.06! I've tested the 64-bit release on my software, AZdecrypt , having almost 50.000 lines and there were no problems. What gcc is used and is there a link that shows what compiler switches are available? Mainly need to ...
by Provoni
Jan 06, 2019 15:13
Forum: Community Discussion
Topic: Building FreeBASIC 1.06 Release
Replies: 46
Views: 5837

Re: Building FreeBASIC 1.06 Release

Amazing work coderJeff and other people involved. Thank you very much for keeping FreeBASIC going.
by Provoni
Dec 06, 2018 10:57
Forum: Projects
Topic: JIT-Assembler (x86)
Replies: 1
Views: 527

Re: JIT-Assembler (x86)

Thanks for sharing IchMagBier. In computer science an assembler is a program that turns assembly language into machine code. An assembler is a program that takes basic computer instructions and converts them into a pattern of bits that the computer's processor can use to perform its basic operations...
by Provoni
Nov 17, 2018 11:49
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 17593

Re: Windows GUI

Wow thank you jj2007 that is working. There are indeed allot of warnings. I will try to implement it into my code and let you know how it goes.
by Provoni
Nov 17, 2018 8:37
Forum: Beginners
Topic: Windows GUI
Replies: 145
Views: 17593

Re: Windows GUI

What I don't understand is that it seems to be so complicated to change the color of something. Suppose that you need to change whether the edit control is enabled or disabled it is simple a matter of: enablewindow(hwnd,bool) And that actually changes the color! My program is 64-bit only I cannot yo...

Go to advanced search