Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Qedo

#406
The Ocean's code use a lookup table and take a value from a matrix.
It's the fastest.
Ciao
#407
in the Kanonet code eliminated the integer cast  (see code) Now >10% faster (on my computer)

Code (glbasic) Select

FUNCTION QQSIN1: x // Kanonet
LOCAL xx%
xx=x
IF xx >= 360
DEC x, ( xx / 360 ) * 360  // was DEC x, INTEGER( x / 360 ) * 360
ELSEIF  x < 0
INC x, ( 1 - xx / 360 ) * 360 // was INC x, INTEGER( 1 - x / 360 ) * 360
ENDIF

IF x < 180
x = ( 0.02222144652331750907567718514381 - 0.00012346049003081125437778164739108 * x )* x
RETURN ( 0.775 + 0.225 *x ) * x
ENDIF
x = 180 - x
x = ( 0.02222144652331750907567718514381 + 0.00012346049003081125437778164739108 * x ) * x
RETURN ( 0.775 - 0.225 * x ) * x
ENDFUNCTION


@Ocean
your code is very very fast (40% faster) congratulations.
Ingenious the & bAnd control in: return _cos_tbl_[ (int)(x * __d__) & __c__] ;
the other side of the coin is the increased use of memory of the lookup table.
Ciao
#408
sorry Ocean, but I don't understand.
The angles outside 0-360 degrees are redused at the first quadrant but not converted in integer.
Can you give a practical example?
#409
Kanonet
You're right.
Your code is faster on average by 7%
well done
ciao
#410
@ Quentin
the new QQSIN for high (and low) angle.
Ciao


[attachment deleted by admin]
#411
FUNCTION QQCOS: x
   RETURN QQSIN(x+90)
ENDFUNCTION

Ciao
#412
would not be better that the update files rather than generically called glbasic_sdk.exe, were called glbasic_sdk_10.57.exe  or  glbasic_sdk_10.68.exe for example? In this way with the version number in the filename would become much easier to manage updates.
Ciao
#413

feel free to use it   :)
#414

M_QSIN (ampos code) = 380 ms
QQSIN = 230 ms
QSIN   = 580 ms
SIN GLBasic= 1150 ms
Wait your time

[attachment deleted by admin]
#415
new QSIN (QQSIN).
on my computer (notebook):
QQSIN = 230 ms
QSIN   = 580 ms
SIN GLBasic= 1150 ms
Wait your time


[attachment deleted by admin]
#416
I think the problem is TO and no OR.
Try with NOTO% or RETOMA%
#417
FAQ / Re: First contact
2011-May-23
SpriteSpeedTester

On my notebooK Centrino 1.8Ghz Nvidia 8400 13-20FPS

#418
As I said I would use the database as well as use of tables and charts as excel, see picture ..

a picture speaks a thousand words:

#419
Hello everyone,
I want to write a program (especially for smartphone) management training for runners , and then I also manage the data base even if very simple, tables and graphic.
My question is: is GLBasic  a programming language suitable for this purpose?
Thank you
#420
Hi all,
it's possible capture portion of screen outside the program of glbasic  (capture desktop,explorer,firefox etc)?
I would like write a magnifier program in windows system.
Thank you
Edo