Skip to content

Decide if we want to generate DivisionByZeroException errors #26

Closed
@DartBot

Description

@DartBot

This issue was originally filed by garysweave...@gmail.com


Dart should not report a number divided by zero as infinity. And if infinity is allowed, math using infinity should be correct.

What steps will reproduce the problem?

  1. Use the following code:

main() {
  print(1 / 0);
  print((1 / 0) / (1 / 0));
}

What is the expected output? What do you see instead?

It should report:

NaN
NaN

Instead it reports:

Infinity
NaN

What version of the product are you using? On what operating system?

Using the following on Oct 10, 2011 15:50 EDT

http://www.dartlang.org/docs/getting-started/

Please provide any additional information below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.closed-as-intendedClosed as the reported issue is expected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions