Jael driving a tent stake from temple to temple through the head of a philistine she lured into her tent. God thought she was really really great for that one.
You've also got such a low userid, that I have to believe that the only reason for your rudeness would be a mental illness of some kind.
If "everyone" (and just who is everyone exactly) knows about floating point money values, then why am I working on code right now (owned by someone who should know better - think New York finance house) that has all sorts of float money values? Seems to me that this increasingly hypothetical "everyone" that you speak of missed class that day.
The SRB propellant didn't extinguish after the range safety pyros fired. Basically, the front of the SRB's are blown off, and the thrust comes out both the front and the back, nullifying it. The propellant continues to burn until it is consumed.
The SRB didn't blow up. It pivoted on its front attachment and pierced the fuel tank skin. The fuel tank ripped apart and the fuel burned off. The orbiter was destroyed as it was thrown sideways into the airstream.
The answer to your questions: use BCD. When you've got to do math on your numbers and you can't have rounding errors, then you need BCD.
Floats are never the answer for storing money values. Sometimes you might have to use floating point math, but every effort to avoid it should be taken.
That's not the error I was addressing. Here's some definitions of a subtotal:
float subtotal;// wrong way to represent money long subtotal_pennies;// right way to represent money
And, if you're at a gas station, you need to represent money like this:
long subtotal_mils;// gas per gallon has a 9/10 of a cent on the end - $1.34 9/10
The calculations that you perform on the money are a completely different story. There's no point in worrying about 4 decimal places of percentages if you don't start from the right place.
Here's an example of what I'm talking about: A Dell server, 650Mhz P3, 256 megs RAM, 18 gigs RAID. The thing is only $399 with 12 hours left to go in the bidding. And if you need it, you can even add another processor later. But I doubt that you will need it soon.
No kidding it's overkill. I was mildly slashdotted when I put up my photos of Columbia, and the server load on my Celery 300 never went above 0.1. I have static pages, but still.
You don't need a big machine at all. Get a cheapie server in the 500 Mhz pentium III class, give it a good amount of memory and fast disks. You'll be in business for the next 5 years with that setup. You shouldn't have to spend more than $700. Even that might be a bit much, but you could look on E-bay for something with real server features, rather than pressing a desktop machine into server duty.
They might have done that, but it's still not the best way to do it. They are not likely to get the maximum amount of money possible for the slots. An auction is a good way to set a market value for a single item, but it won't help you at all when you're looking to determine the curve that you can use to maximize profit when you've got X number of items to sell.
An auction is the wrong way to set the price for something like a car pool lane. The reason is that if too many slots are sold, the value of the car pool lane goes down. i.e. the carpool lane is jammed full of cars.
They need to figure out how many slots they need to sell, then figure out the demand curve for the product. The price should be figured from that curve, so that not too many are sold.
How about the time that Jael lured a Philistine into her tent, and when the dude fell asleep she drove a stake through his head, right through the temples.
God really thought she was the shizzat after that. For killing a man while he slept, she was called blessed among women.
The Bible is filled with disgusting violence. For you to argue otherwise indicates that you are either deceptive, or ignorant.
Because to do that would take a lot of money. More money than you have ever seen in one place at one time. If you were to put that money into wheelbarrows, you'd say "holy shit that's a lot of wheelbarrows of money."
Plus, it would take a while to build a new satellite, get time on a launcher somewhere, and launch it.
They definitely are a bunch of dirty spammers. I got that spam too, and it was sent to slashdot@pdrap.org, which I only use here. I suggest that all of us collectively give those morons a big yawn.
If you're going to dye your hair purple, then find employers that will hire people with purple hair. Likewise, if you like to wear a suit to work every day, don't work for a bunch of people with purple hair. I mean, DUH.
Jael driving a tent stake from temple to temple through the head of a philistine she lured into her tent. God thought she was really really great for that one.
Would that be Java 1.4.2, or is it Java 2. Or is it Java 2 full speed? And when will SCO be suing the bastards?
You've also got such a low userid, that I have to believe that the only reason for your rudeness would be a mental illness of some kind.
If "everyone" (and just who is everyone exactly) knows about floating point money values, then why am I working on code right now (owned by someone who should know better - think New York finance house) that has all sorts of float money values? Seems to me that this increasingly hypothetical "everyone" that you speak of missed class that day.
It's a bad thing to run out of airspeed, altitude, and ideas all at the same time.
The SRB propellant didn't extinguish after the range safety pyros fired. Basically, the front of the SRB's are blown off, and the thrust comes out both the front and the back, nullifying it. The propellant continues to burn until it is consumed.
The SRB didn't blow up. It pivoted on its front attachment and pierced the fuel tank skin. The fuel tank ripped apart and the fuel burned off. The orbiter was destroyed as it was thrown sideways into the airstream.
There are C++ libraries that implement BCD. A great use of operator overloading.
The answer to your questions: use BCD. When you've got to do math on your numbers and you can't have rounding errors, then you need BCD.
Floats are never the answer for storing money values. Sometimes you might have to use floating point math, but every effort to avoid it should be taken.
Look at this
Metric time is based on divisions of 10. And so is the metric calendar.
That's not the error I was addressing. Here's some definitions of a subtotal:
// wrong way to represent money // right way to represent money
// gas per gallon has a 9/10 of a cent on the end - $1.34 9/10
float subtotal;
long subtotal_pennies;
And, if you're at a gas station, you need to represent money like this:
long subtotal_mils;
The calculations that you perform on the money are a completely different story. There's no point in worrying about 4 decimal places of percentages if you don't start from the right place.
Don't count money as floating point. You'll just have rounding errors. Using long doubles instead of floats won't help you at all.
The solution is to count pennies instead, or if you need values bigger than 22 million dollars, use a BCD library. BCD is Binary Coded Decimal.
Here's an example of what I'm talking about: A Dell server, 650Mhz P3, 256 megs RAM, 18 gigs RAID. The thing is only $399 with 12 hours left to go in the bidding. And if you need it, you can even add another processor later. But I doubt that you will need it soon.
No kidding it's overkill. I was mildly slashdotted when I put up my photos of Columbia, and the server load on my Celery 300 never went above 0.1. I have static pages, but still.
You don't need a big machine at all. Get a cheapie server in the 500 Mhz pentium III class, give it a good amount of memory and fast disks. You'll be in business for the next 5 years with that setup. You shouldn't have to spend more than $700. Even that might be a bit much, but you could look on E-bay for something with real server features, rather than pressing a desktop machine into server duty.
The downloadable pdf of this document is an EXE file. Nice try, but I am not fooled. I'm running Linux anyway.
They are handed a sword and are expected to disembowel themselves. Their managers stand over them to cut their head off so they don't suffer so much.
That's a patent on a business method, and sensibly, the ancients didn't allow patents on that.
They might have done that, but it's still not the best way to do it. They are not likely to get the maximum amount of money possible for the slots. An auction is a good way to set a market value for a single item, but it won't help you at all when you're looking to determine the curve that you can use to maximize profit when you've got X number of items to sell.
An auction is the wrong way to set the price for something like a car pool lane. The reason is that if too many slots are sold, the value of the car pool lane goes down. i.e. the carpool lane is jammed full of cars.
They need to figure out how many slots they need to sell, then figure out the demand curve for the product. The price should be figured from that curve, so that not too many are sold.
How about the time that Jael lured a Philistine into her tent, and when the dude fell asleep she drove a stake through his head, right through the temples.
God really thought she was the shizzat after that. For killing a man while he slept, she was called blessed among women.
The Bible is filled with disgusting violence. For you to argue otherwise indicates that you are either deceptive, or ignorant.
Because to do that would take a lot of money. More money than you have ever seen in one place at one time. If you were to put that money into wheelbarrows, you'd say "holy shit that's a lot of wheelbarrows of money."
Plus, it would take a while to build a new satellite, get time on a launcher somewhere, and launch it.
They definitely are a bunch of dirty spammers. I got that spam too, and it was sent to slashdot@pdrap.org, which I only use here. I suggest that all of us collectively give those morons a big yawn.
If you're going to dye your hair purple, then find employers that will hire people with purple hair. Likewise, if you like to wear a suit to work every day, don't work for a bunch of people with purple hair.
I mean, DUH.
Did someone say robotic players?
From my memory of the Dune novels, I think Frank Herbert talked about everything but that.
In about 10 years, La-Z-Boy is going to introduce the chair dog.