Search found 313 matches

by Provoni
May 30, 2019 6:41
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

It is indeed faster and better and I will be using it instead. Thanks!

Using the following compiler flags: -gen gcc -Wc -march=native,-Ofast,-funroll-loops,-fomit-frame-pointer,-ftree-loop-im,-fivopts,-pipe
by Provoni
May 26, 2019 17:49
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

Thanks OSchmidt for your function,

I have tested it and it is a bit slower than Richard's for my program. As you say it could probably be optimized a little bit further and have not tried altering the i_0_11 parameter yet.
by Provoni
May 26, 2019 17:47
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

The problem with approximating diadic functions like a^b is that they cover an area rather than a line, so usually require two, or possibly three, approximations to get one answer. There are a few possible ways to speed it up further. 1. Implement it as macro “inline code” to remove the function ca...
by Provoni
May 25, 2019 14:14
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

Thanks Richard, I have just released a new version this morning and included a mention of your code in the Readme.txt in the base directory of the program. https://www.freebasic.net/forum/viewtopic.php?f=8&t=23188 I have tested both your functions with the programs functionality in mind and pref...
by Provoni
May 25, 2019 7:40
Forum: Projects
Topic: AZdecrypt
Replies: 7
Views: 2886

Re: AZdecrypt

AZdecrypt 1.15 released: http://www.zodiackillersite.com/viewtopic.php?f=81&t=3198 AZdecrypt 1.15: Again a huge update and I will illustrate some examples of the new functionality during the next days. - beijinghouse made a special 8-gram system that is only 50% slower than 7-grams and uses only...
by Provoni
May 21, 2019 19:41
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

Thanks for your updated function, error table and plotter Richard. Much appreciated!
by Provoni
May 20, 2019 14:13
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

I'm happy that you find them useful. You can credit me as “Richard Freebasic”. I am interested in the particular n-gram techniques you are using for the solution of substitution ciphers. Do you have any references to papers or books that cover n-gram based solution. Okay, will do. My algorithm is m...
by Provoni
May 19, 2019 17:43
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

Richard wrote:and here is the faster single routine using the same approximations.

This one rocks. I will be using it for my program: viewtopic.php?f=8&t=23188

Do you want to be credited?
by Provoni
May 19, 2019 13:41
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

Thanks allot Richard!
by Provoni
May 12, 2019 12:28
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

Thanks paul doe, it is very fast but the approximation is not very good though it may be good enough for my needs. Indeed, the error is huge (and it'll only get worse the more you use them). Ahh, these kind of codes brings back so many fond memories ... ;) I saw this on YouTube a while ago. Of cour...
by Provoni
May 12, 2019 7:26
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

Re: Need faster Exponentiate

Thanks paul doe, it is very fast but the approximation is not very good though it may be good enough for my needs.
by Provoni
May 11, 2019 18:46
Forum: General
Topic: Need faster Exponentiate
Replies: 32
Views: 1619

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: 1619

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: 1619

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: 1619

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...

Go to advanced search