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

  • SEARCH
  • Home
  • 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 7645521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T09:57:46+00:00 2026-05-31T09:57:46+00:00

I have two fields in my database that are defined as floats [Longitude] [float]

  • 0

I have two fields in my database that are defined as floats

[Longitude] [float] NULL
[Latitude] [float] NULL

I have added them to my linq2sql dbml and they show as floats as follows
enter image description here

I can see in my database there is the value -3.6607431 for Longitude however when I profile the sql (using sql express and a custom profiler tool) I see that the actual value passed in queries is 3.6607429981231689.

It seems to have lost the negative sign and had extra values added.

Is there something I’m missing does a float in SQL not map to a float like this in the dbml or is there another issue going on

  • 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-05-31T09:57:47+00:00Added an answer on May 31, 2026 at 9:57 am

    A value of -3.6607431f in C# is actually exactly -3.6607429981231689453125 – i.e. that’s the exactly-representable float value which is closest to -3.6607431. So I think that answers the precision part – it’s just a natural part of binary floating point. Basically, you shouldn’t worry about that – unless you need precise decimal values, in which case you should map to decimal instead of float (and update your database schema appropriately).

    The sign issue is somewhat different – and my guess is that you’ve misdiagnosed it somewhere, or you’ve got some code which negates things. I very much doubt that that’s a database problem.

    It’s not clear from your description whether you’re fetching results or passing a parameter in a query (you talk about a “value passed in queries” which could mean either way). If you could show the code involved and how you’re diagnosing the problem, that would help.

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

Sidebar

Related Questions

I have a database table that includes a two bit fields: IsEvenSide and IsOddSide
I have a table in a database that contains two fields id name I
I have a database that has two fields: current, and previous. Here is the
I have two nvarchar fields in a database to store the DataType and DefaultValue,
Suppose I have a database table with two fields, foo and bar. Neither of
I have a table, users, in an Oracle 9.2.0.6 database. Two of the fields
I have two fields that need to multiply each other and fill a third
Suppose I have two queries on a database table. The queries are defined in
I have two numeric fields that contain the following information: (1) Users Registered (2)
I am struggling with an SQL time comparison on two fields that have been

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.