[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Bug in % (Float)?

Robert Klemme

8/30/2007 9:12:00 AM

2007/8/30, Charlie Lehardy <charlie.lehardy@gmail.com>:
> Modulo should be a fairly simple operation, however I'm finding some very
> odd results and am wondering what is going on... For instance:
>
> irb(main):001:0> 1 % 0.1
> => 0.1

Floats are not very well suited for modulo operations. Btw, here's
why you probably see 0.1:

irb(main):001:0> (1 % 0.1) - 0.1
=> -5.55111512312578e-17

You should probably read up a bit on numeric issues with floating
point arithmetic. See also other postings for explanations.

Kind regards

robert

3 Answers

Sheldon Cooper

1/28/2011 3:30:00 PM

0

On Jan 27, 9:07 pm, Yoorg...@Jurgis.net wrote:
> On Thu, 27 Jan 2011 16:38:18 -0800 (PST), Sheldon Cooper
>
> <richarddead...@gmail.com> wrote:
> >> >What do you think the Civil Rights Act of 1965 was?
>
> A FEDERAL LAW

So, Wilson, Truman and FDR COULD have ended Jim Crow..., they just
didn't want to. Hell, they didn't even condemn the laws - because
they agreed with them.


> >> A federal law act passed AFTER:
>
> >> a) the liberal wing of the DNC introduced it
>
> >> b) the Integration of Military
>
> >> c) the Brown v board decision
>
> >> d) the national electorate FINALLY not tolerating CONSERVATIVES
> >And why didn't Truman introduce it twenty years earlier?  Or FDR
> >thirty years earlier.  Or Wilson fifty years earlier?
>
> Brown v Board wasn't passed until 1954---during Eisenhowers term


> At that time, SOUTHERN CONSERVATIVE "Jim Crow laws" were being
> dismantled.

Since Jim Crow laws were enbraced and encouraged (and bested) by the
three leading leftists in 20th Century America, that leads to the
musical question "what makes Jim Crow laws conservative?" How much
more leftist can one get thatn Woodrow Wilson, FDR and Harry Truman?
Planned Paeenthood? OK, they've very leftist - ooops, Myra pushed
eugenics and racial engineering.

> Is there something you can't understand about the time periods in all
> this?

Since you asked - why does a 1954 lawsuit wipe FDR's slate clean for
his 1942 rounding up of all the Japanese-American citizens, seizing
their property, and sending them to work camps? Would George Taki,
upon hearing about the decision say "Oh, my - never mind about being
kidnapped by federal officals and spending my childhood in a
workcamp. Debt paid - in - full?"

Why does a court hearing forty years after the fact undo the Wilson's
Palmer raids? Or his support of the KKK?

> STATE LAW engendered Jim Crow and segregation

And why didn't Wilson, FDR, and Truman condemn those laws? Oh,
right, BECAUSE BLACKS VOTED REPUBLCIAN AT THE TIME, AND DOING THE
RIGHT THING WOULD HAVE THREATENED THEIR BASE.

> State law enforced "tests" for voting (for blacks)

And why didn't Wilson, FDR, and Truman condemn those laws? Oh,
right, BECAUSE BLACKS VOTED REPUBLCIAN AT THE TIME, AND DOING THE
RIGHT THING WOULD HAVE THREATENED THEIR BASE.

> State law segregated races

And why didn't Wilson, FDR, and Truman condemn those laws? Oh,
right, BECAUSE BLACKS VOTED REPUBLCIAN AT THE TIME, AND DOING THE
RIGHT THING WOULD HAVE THREATENED THEIR BASE.

> From 1954-1965 (11 yrs)---the transition from Conservative abuses in
> the south to the Civil rights act---was set up by Brown v Board---and
> the eventual civil rights act of 1965

(snicker) Do you have the GALL to tell me that Wilson, FDR, and Truman
WOULDN'T have proposed an Equal Right Amendment without winning a
lawsuit?

> Which enraged SOUTHERN CONSERVATIVES so that they left the Democratic
> party and became republicans

Except that they didn't. 18 of the 20 Dixiecrats remained Democrats
for the rest of their political, and natural, lives.

Sorry, it's a nice day dream - but that's all. The Democrats have a
long, ugly, racist history - which some day you're going to have to
come to terms with.

> That's why your GOP leadership all have a southern drawl.

When Warren G. Harding ran for president, your grandparents spread
rumors that he was one quarter black. They handed out leflets with a
picture of the White House and the caption "Uncle Tom's New Cabin."


Slackjaw

2/20/2011 4:35:00 AM

0

Sheldon Cooper wrote:

> On Jan 26, 9:30?pm, Yoorg...@Jurgis.net wrote:
> > On Wed, 26 Jan 2011 18:58:36 -0800 (PST), Sheldon Cooper
> >
> > <richarddead...@gmail.com> wrote:
> > >> Gore was a state senator
> >
> > > No kidding, how stupid are you?
> >
> > Ok, the correct wording should have been---He was a senator from a
> > state.
>
> Which means that he dealt with federal issues, not state issues.
>
> So, what's your point?

I find it best never to respond to Gary Rosalles. There really is no
point. As you can tell, he has the intellect of a six-year-old.

I mean, how stupid does one have to be to not know what a "state
senator" is?

Man of Mind

2/20/2011 5:01:00 AM

0

On 2/19/2011 10:35 PM, slapped_raw AKA faulty_spam whined impotently:

"I found that it's best to not respond to Gary. He deparately seek
attention and hates it when he's ignored."

> As you can tell, he has the intellect of a six-year-old.

*>LOL!<* Dim, addled..

"Did you know that Rush listener are on average, better education
and more intelligence that the population at large?"

"I can't help but notice how it seems liberals' posts are full
of grammar and spelling mistake, as if they can't write above
a fifth-grade level."

"Stupid people have just as much a right to their opinion as smart
people do."

"That whay the GOP is promising - don't you think it's a good idea?"

"Heck no, nor do I expect Obama would never get us back on our feet."

"I post the facts - if you csan dispute them go ahead."

"But I believe I'll appeal to a higher authoprity"

"Please don't post that anymore - you're made your point."

"Please stop repsonding to me - you sully my posts with your claptrap."

"What part of "Please stop repsonding to me" did you NOT understand"

--"Now, would you like me to correct your psychics mistakes?"