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 8347425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T07:21:40+00:00 2026-06-09T07:21:40+00:00

Would you consider this to be a bug, or to be expected behaviour? Consider

  • 0

Would you consider this to be a bug, or to be expected behaviour?

Consider the following

  1 * (2/(1+2))

  equals 0

  1 * ((double)2/(1+2))

  equals 0.6667
  • 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-09T07:21:42+00:00Added an answer on June 9, 2026 at 7:21 am

    This is not a bug. Arithmetic operations where all operands are int yield an int as result.
    This is also documented in the MSDN:

    When you divide two integers, the result is always an integer. For example, the result of 7 / 3 is 2. To determine the remainder of 7 / 3, use the remainder operator (%). To obtain a quotient as a rational number or fraction, give the dividend or divisor type float or type double. You can do this implicitly by expressing the dividend or divisor as a decimal by putting a digit to the right of the decimal point

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

Sidebar

Related Questions

This bug took me a while to find... Consider this method: public void foo(Set<Object>
Consider the following code: function Dog() { this.foo = function() {}; this.walk = function()
Not sure if this is a MMA bug or me doing something wrong. Consider
Consider this scenario: The project manager orders 10 bug fixes from the developer team.
Consider the following code (it came about as a result of this discussion ):
Consider this simple example (which displays in red): echo -e \033[31mHello World\033[0m It displays
Consider this line: std::wcout << Hello World!; Is it OK to pass char* or
consider my source file looks like this. <Content xmlns=uuid:4522eb85-0a47-45f9-8e2b-1x82c78xx920> <first>Hello World.This is Fisrt field</first>
So I would consider myself a .Net and ASP.NET pro but I am a
I have what I would consider a small sized iPhone app that uses SQLite.

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.