Hey
I just wondered if I was doing something basic wrong with using doubles. So my program reads values from as database, divides a few together, then writes the new values (always a decimal) to a different column. I have made sure that the column is a double type.
So this is my code:![[Image: 675f86d87fe79e9ca1ed1ce39776b679.png]](https://i.gyazo.com/675f86d87fe79e9ca1ed1ce39776b679.png)
and this is the output:![[Image: ed21ddf05e1efaf793334f2c03a3af80.png]](https://i.gyazo.com/ed21ddf05e1efaf793334f2c03a3af80.png)
and this is how its wrote to the DB -![[Image: 352b5fa4a663862cc2976af630302412.png]](https://i.gyazo.com/352b5fa4a663862cc2976af630302412.png)
(ignore the red line, was changing variable names).
Is there something fundemental wrong with the way that I've used the double type?
Cheers
I just wondered if I was doing something basic wrong with using doubles. So my program reads values from as database, divides a few together, then writes the new values (always a decimal) to a different column. I have made sure that the column is a double type.
So this is my code:
![[Image: 675f86d87fe79e9ca1ed1ce39776b679.png]](https://i.gyazo.com/675f86d87fe79e9ca1ed1ce39776b679.png)
and this is the output:
![[Image: ed21ddf05e1efaf793334f2c03a3af80.png]](https://i.gyazo.com/ed21ddf05e1efaf793334f2c03a3af80.png)
and this is how its wrote to the DB -
![[Image: 352b5fa4a663862cc2976af630302412.png]](https://i.gyazo.com/352b5fa4a663862cc2976af630302412.png)
(ignore the red line, was changing variable names).
Is there something fundemental wrong with the way that I've used the double type?
Cheers




![[Image: 45728d087979f311a5a8e4429c755870.png]](https://i.gyazo.com/45728d087979f311a5a8e4429c755870.png)