Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify meaning of isOdd and isEven for doubles #465

Closed
ghost opened this issue Nov 15, 2011 · 2 comments
Closed

Specify meaning of isOdd and isEven for doubles #465

ghost opened this issue Nov 15, 2011 · 2 comments
Assignees
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant

Comments

@ghost
Copy link

ghost commented Nov 15, 2011

Current implementation is odd, e.g., 5.9 % 2.0 === 1.9

  bool isEven() {
    // TODO(floitsch): find more efficient way to implement Double.isEven.
    return this % 2.0 == 0.0;
  }
  bool isOdd() {
    // TODO(floitsch): find more efficient way to implement Double.isOdd.
    return this % 2.0 == 1.0;
  }


co19 test:
LibTest/core/double/isOdd/double/isOdd/A01/t02

@ghost
Copy link
Author

ghost commented Nov 18, 2011

isOdd/isEven will be removed from num and double interfaces, Once done, this bug will transfer to co19 issues

@madsager
Copy link
Contributor

isEven and isOdd are only available on int at this point. Closing bug.


Added AssumedStale label.

@ghost ghost added Type-Defect area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant labels Sep 26, 2012
@ghost ghost assigned floitschG Sep 26, 2012
nex3 pushed a commit that referenced this issue Aug 31, 2016
This preserves the type when cloning an AdjacentStrings node.

[email protected]

Review URL: https://codereview.chromium.org/1756563002 .
copybara-service bot pushed a commit that referenced this issue Oct 6, 2022
convert (https://github.com/dart-lang/convert/compare/11d191e..f0acc6b):
  f0acc6b  2022-10-06  Devon Carew  update the CI configuration (#67)

dartdoc (https://github.com/dart-lang/dartdoc/compare/9908cf8..c2f66ec):
  c2f66ecf  2022-10-06  dependabot[bot]  Bump ossf/scorecard-action from 2.0.3 to 2.0.4 (#3205)
  479f27ba  2022-10-06  Sam Rawlins  Deprecate src/model/model.dart as public API (#3208)

markdown (https://github.com/dart-lang/markdown/compare/e7915ed..f387340):
  f387340  2022-10-06  Zhiguang Chen  Fix unicode case folding (#465)

webkit_inspection_protocol (https://github.com/google/webkit_inspection_protocol.dart/compare/4e5eb8d..b825c8f):
  b825c8f  2022-10-05  Devon Carew  Ci updates (#93)

Change-Id: Ia68ad07c0046603ea17485db7ddb9744cfa970e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263043
Reviewed-by: Nate Bosch <[email protected]>
Commit-Queue: Nate Bosch <[email protected]>
Commit-Queue: Devon Carew <[email protected]>
Auto-Submit: Devon Carew <[email protected]>
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. closed-obsolete Closed as the reported issue is no longer relevant
Projects
None yet
Development

No branches or pull requests

2 participants