Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7880315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:06:57+00:00 2026-06-03T04:06:57+00:00

When I try to get the difference between two apparently equal numbers, I get

  • 0

When I try to get the difference between two apparently equal numbers, I get a number different than zero.

product_price       min_product_price   price_dif
40,609756097561     40,609756097561         -2,1316282072803E-14

I understand this can be a difficult question to answer without all the queries that lead to this, but I’ll try to explain,

product_price comes straight from the ERP database.

min_product_price is obtained with a

MIN(ItemSellingPrices.UnitPrice) as min_product_price

together with a group by clause. Shouldn’t this mean the numbers are the same?

I have no experience with this kind of issues, so I apologize if this is too basic.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:06:59+00:00Added an answer on June 3, 2026 at 4:06 am

    Looks like a floating point issue.

    If you’re storing money values in float or real columns, try using a decimal/numeric data type instead.

    For storing 12 decimal values, you could use decimal(18, 12), for example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to get the difference between two Java Date objects. I've used Joda-Time
I'm trying to get a feel for the difference in performance between integer multiplication
I am trying to calculate the difference between given two times and i find
I am trying to create a formula for calculating the percentage difference between two
What is the difference between the two lines of code below: CComPtr< IInterface >
I'm calculating the Euclidean distance between n-dimensional points using OpenCL. I get two lists
I try get a my attribute inside Fancybox, and I get when I use
I try to get to a page straight from Bash at http://www.ocwconsortium.org/ . The
I try to get all WPF window controls collections. In other words i try
I try to get the name of executable name of all of my launched

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.