Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
Sent: Monday, October 12, 2009 7:12 PM #>To: General Discussion of SQLite Database #>Subject: Re: [sqlite] Igor's Equation #> #> #>´¯¯¯ #>>So what am I missing? #>`--- #> #>The word 'Euclidean'. Stop dividing just before th

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
s-boun...@sqlite.org [mailto:sqlite-users- #>boun...@sqlite.org] On Behalf Of Pavel Ivanov #>Sent: Monday, October 12, 2009 6:54 PM #>To: General Discussion of SQLite Database #>Subject: Re: [sqlite] Igor's Equation #> #>> 1400 % 1300 = .0769231 #> #>You're wrong with this. #>1400

Re: [sqlite] Igor's Equation

2009-10-12 Thread Jean-Christophe Deschamps
´¯¯¯ >So what am I missing? `--- The word 'Euclidean'. Stop dividing just before the result gets fractional and you're home. ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Igor's Equation

2009-10-12 Thread Igor Tandetnik
Rick Ratchford wrote: > #>Hi Rick, > #> > #> > #>You seem to be misinterpreting the semantics of the % (modulo) > operator. #> > #> X % Y returns the (integral) remainder of the Euclidean division > of #>X by Y (both integers). > #> > #>Now things should be clearer. > #> > > I didn't

Re: [sqlite] Igor's Equation

2009-10-12 Thread Pavel Ivanov
> 1400 % 1300 = .0769231 You're wrong with this. 1400 % 1300 = 1400 - (1400 / 1300) * 1300 = 1400 - 1 * 1300 = 100 So you have indeed misinterpreted the modulo operator http://en.wikipedia.org/wiki/Modulo_operation. Pavel On Mon, Oct 12, 2009 at 7:49 PM, Rick Ratchford

Re: [sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
#>Hi Rick, #> #> #>You seem to be misinterpreting the semantics of the % (modulo) operator. #> #> X % Y returns the (integral) remainder of the Euclidean division of #>X by Y (both integers). #> #>Now things should be clearer. #> Hi. I didn't misinterpret the %. I understand how it works. :-)

[sqlite] Igor's Equation

2009-10-12 Thread Rick Ratchford
Igor- While your math works, I'm still puzzled as to how you came up with this. ((Month - StartMth)*100 + (Day - StartDay) + 1300) % 1300 <= ((EndMth - StartMth)* 100 + (EndDay - StartDay) + 1300) % 1300 With this... ((Month - StartMth)*100 + (Day - StartDay) + 1300) % 1300 The result will