Re: [sqlite] What is quicker?

2008-06-06 Thread John Stanton
Dennis Cote wrote: > John Stanton wrote: >> But for practical arithmetic probability or possibility is not close >> enough. It must be certainty. > > There is a possibility that your code could be asked to compare two > equal floating point numbers. To be correct, it must handle that case.

Re: [sqlite] What is quicker?

2008-06-06 Thread ajm
In relation with the floating point number and its IEEE internal representation, may be of interest: http://babbage.cs.qc.edu/IEEE-754/ HTH Adolfo ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] What is quicker?

2008-06-06 Thread Ken
Hence the word "SOME"... :) Asif Lodhi <[EMAIL PROTECTED]> wrote: Hi Ken, On 6/6/08, Ken wrote: > Some numbers can be represented exactly using the > floating point type. . Here is a reference from "The C++ Programming Language, 3rd Edition" by Bjarne Stroustrup, Page 835, section

Re: [sqlite] What is quicker?

2008-06-06 Thread Asif Lodhi
Hi Ken, On 6/6/08, Ken <[EMAIL PROTECTED]> wrote: > Some numbers can be represented exactly using the > floating point type. . Here is a reference from "The C++ Programming Language, 3rd Edition" by Bjarne Stroustrup, Page 835, section - C.6.2.6:

Re: [sqlite] What is quicker?

2008-06-06 Thread Dennis Cote
John Stanton wrote: > > But for practical arithmetic probability or possibility is not close > enough. It must be certainty. There is a possibility that your code could be asked to compare two equal floating point numbers. To be correct, it must handle that case. If it does not, it is

Re: [sqlite] What is quicker?

2008-06-06 Thread Stephen Oberholtzer
One of the things that people fail to understand is that floating point numbers are stored in *binary*. In fact, I bet a number of people who understand the exact binary formatting of integers don't understand that the technique translates pretty much directly into floating point: a floating

Re: [sqlite] What is quicker?

2008-06-06 Thread Ken
Some numbers can be represented exactly using the floating point type. According to ieee 754 spec: "All integers that are a power of 2 can be stored in a 32 bit float without rounding Precision decreases exponentially as the exponent increases" So for those numbers equality is necessary.

Re: [sqlite] If SQLite Encryption Extension (SEE) FIPS 140-2 compliant?

2008-06-06 Thread Kees Nuyt
On Fri, 6 Jun 2008 10:17:36 -0500, Dan wrote: > I see that SQLite Encryption Extension (SEE) uses AES > for its encryption algorithm. > Does this make SEE FIPS 140-2 compliant? This list should answer it. http://csrc.nist.gov/groups/STM/cmvp/documents/140-1/1401val2008.htm More general

Re: [sqlite] What is quicker?

2008-06-06 Thread Dennis Cote
John Stanton wrote: > > The point about using floating point is that there is no equal, only > less or greater, because it is an approximation. If you want to use > equality you must use some form of integer or fixed ppint numbers. > That's not true at all. While it is not reliable to use

Re: [sqlite] What is quicker?

2008-06-06 Thread John Stanton
Steve Kallenborn wrote: > D. Richard Hipp wrote: >> On Jun 4, 2008, at 7:13 AM, Derrell Lipman wrote: >> >>> On Wed, Jun 4, 2008 at 10:01 AM, D. Richard Hipp <[EMAIL PROTECTED]> >>> wrote: >>> Let me strongly reiterate that you look into using the new R-Tree virtual table available for

Re: [sqlite] how to save an information + Date in SQlite db?

2008-06-06 Thread John Stanton
Look at the built in Sqlite date and time functions. the_chill wrote: > Hello, how do I save a information + Date in a SQlite DB? I want later to > enter a date and get the Information. Like information from > 07.08.05-03.04.06 or so. I tryed SQlite browser but found no way. I need to > share the

[sqlite] If SQLite Encryption Extension (SEE) FIPS 140-2 compliant?

2008-06-06 Thread Dahl, Daniel
I see that SQLite Encryption Extension (SEE) uses AES for its encryption algorithm. Does this make SEE FIPS 140-2 compliant? Thanks, Dan ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] Thank you

2008-06-06 Thread noel frankinet
D. Richard Hipp a écrit : > I'd like to take credit for the new r-tree module because it is a fine > piece of work. But in truth the new r-tree module was written > entirely by Dan Kennedy. http://www.sqlite.org/crew.html Good job, > Dan! > > D. Richard Hipp > [EMAIL PROTECTED] > > >

Re: [sqlite] Binding Date value in Prepare/bind

2008-06-06 Thread Igor Tandetnik
"Bharath Booshan L" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > We have developed an App that was written for Version 3.1.3 available > in > Mac OS 10.4. > Now I have to move all the sqlite_exec to prepare/step/finalize > methods, > but as per the documents, it says 'use of

Re: [sqlite] Thank you

2008-06-06 Thread RaghavendraK 70574
Kudos!!! to Dan/DRH. We always get responses from Dan/DRH which is logical,meaningful and on dot. regards ragha ** This email and its attachments contain confidential information from HUAWEI, which is

Re: [sqlite] Thank you

2008-06-06 Thread D. Richard Hipp
I'd like to take credit for the new r-tree module because it is a fine piece of work. But in truth the new r-tree module was written entirely by Dan Kennedy. http://www.sqlite.org/crew.html Good job, Dan! D. Richard Hipp [EMAIL PROTECTED]

Re: [sqlite] Binding Date value in Prepare/bind

2008-06-06 Thread Bharath Booshan L
Thanks Igor, >> I am asking this because julianday(date('1984-03-03')) = >> julianday('1984-03-03'). Right? > > Right. In fact, date('1984-03-03') is a no-op: the result of > date('1984-03-03') is simply '1984-03-03'. Though I fail to see how this > fact is relevant to your original question.

Re: [sqlite] Binding Date value in Prepare/bind

2008-06-06 Thread Igor Tandetnik
"Bharath Booshan L" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 1. Can I use sqlite3_prepare_v2 in Version 3.1.3? No. It was introduced in v3.3.9 > 2. How do I bind date values using prepare/bind methods? SQLite doesn't have dedicated date or time types. You may choose to

[sqlite] Thank you

2008-06-06 Thread Christophe Leske
I would like to thank all the participatns of this list for the very useful information i got here the last days. A big thank you to everyone, including of course Mr Hipp. The rtree implementation is really quick and does work like a charm. Best regards, -- Christophe Leske

Re: [sqlite] SQL question

2008-06-06 Thread Andrea Galligani
Hi Simon, it works very well. Now I study it and I try to understand why it works :-) Thanks a lot Andrea Simon Davies ha scritto: > Andrea, > > This appears to do what you want... > > SQLite version 3.4.2 > Enter ".help" for instructions > sqlite> > sqlite> create table tst( name text, score

Re: [sqlite] SQL question

2008-06-06 Thread Federico Granata
sqlite> create table t1(n,c); sqlite> insert into t1 values("a",3); sqlite> insert into t1 values("a",5); sqlite> insert into t1 values("b",7); sqlite> insert into t1 values("b",2); sqlite> select * from t1; a|3 a|5 b|7 b|2 sqlite> select n,max(c) from t1 group by n; a|5 b|7 -- [image: Just A

Re: [sqlite] SQL question

2008-06-06 Thread Simon Davies
Andrea, This appears to do what you want... SQLite version 3.4.2 Enter ".help" for instructions sqlite> sqlite> create table tst( name text, score integer, info text ); sqlite> insert into tst values( 'A', 289, 'A1' ); sqlite> insert into tst values( 'C', 29, 'C1' ); sqlite> insert into tst

[sqlite] Binding Date value in Prepare/bind

2008-06-06 Thread Bharath Booshan L
Hello SQLite users, I have two questions, could anyone please help me out. 1. Can I use sqlite3_prepare_v2 in Version 3.1.3? 2. How do I bind date values using prepare/bind methods? Eg: INSERT INTO TABLE Info(Name,DOB) values('XYZ',julianday('1984-03-03')); For above example I can write a