Hi Dear Friens
I have found this advice in mailing list history:

I think you can compile the functions into a loadable
library (follow the instructions on creating a sqlite
loadable extension), and then load them in the console
app.  In linux:

  gcc myLoadableLibs.c -shared -o myLoadableLibs.so

then

  sqlite3> .load /home/jp/myLoadableLibs.so


Do someone knows which files from Mikey C's zip archive needs to be compiled 
into loadable extension?

Where are the instructions on creating loadable extension?

Thank You

Jakub Ladman


Dne sobota 10 březen 2007 00:48 Clark Christensen napsal(a):
> A poster here, "Mikey C", wrote some math functions and posted them a month
> or so ago.  You might have a look at
> http://www.mail-archive.com/sqlite-users@sqlite.org/msg21791.html
>
>  -Clark
>
> ----- Original Message ----
> From: Jakub Ladman <[EMAIL PROTECTED]>
> To: sqlite-users@sqlite.org
> Sent: Friday, March 9, 2007 3:00:22 PM
> Subject: Re: [sqlite] sin and similar functions
>
> Thank you very much.
> Not only my english is poor, but my coordinated geometry too :-(
> But my software will make much more geometrical computations, so probably
> some in queries too.
> Please let You (or someone) direct me to the relevant part of documentation
> for defining new functions.
>
> Thank You
> Jakub
>
> Dne pátek 09 březen 2007 23:35 Dennis Cote napsal(a):
> > Jakub Ladman wrote:
> > > I will have table with sequence of coordinates (two dimensional space)
> > > and corresponding radiuses, so sequence of circles. And i need to use a
> > > sqlite query to detect if a actual coordinates (after their
> > > measurement) match some of the circle's square or not. And which
> > > circle, if match. And this must be for low CPU consumption optimised,
> > > so i am not sure, if separate sin table queries will be enough as fast
> > > as i need at needed precission.
> > >
> > > The whole algorithm is proven on mssql by my colegue, but he is using
> > > the native math functions.
> >
> > Jakub,
> >
> > I may not understand your problem completely, but it seems to me you can
> > solve your problem without using any trigonometric functions.
> >
> > If you have a table of circles like this
> >
> >     create table circle (
> >         id  integer primary key,
> >         cx  real,
> >         cy  real,
> >         r   real
> >     );
> >
> > You can find all the circles that contain a given point (px,py) using a
> > simple query based in the distance between the point and the center of
> > the circle.
> >
> >     select id from circle
> >     where (px-cx)*(px-cx)+(py-cy)*(py-cy) < r*r;
> >
> > If you want to create a user defined distance function you could
> > possibly speed up the calculation somewhat. You could then use a query
> > like:
> >
> >     select id from circle
> >     where distance(cx, cy, px, py) < r;
> >
> > where
> >
> >     distance(cx, cy, px, py) = sqrt((px-cx)^2 + (py-cy)^2)
> >
> > HTH
> > Dennis Cote
> >
> >
> > -------------------------------------------------------------------------
> >-- -- To unsubscribe, send email to [EMAIL PROTECTED]
> > -------------------------------------------------------------------------
> >-- --
>
> ---------------------------------------------------------------------------
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---------------------------------------------------------------------------
>--
>
>
>
>
>
> ---------------------------------------------------------------------------
>-- To unsubscribe, send email to [EMAIL PROTECTED]
> ---------------------------------------------------------------------------
>--

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to