8000 Defining the float 3.4028235E38F gives the error "floating point number too large" · Issue #10148 · scala/bug · GitHub
[go: up one dir, main page]

Skip to content
Defining the float 3.4028235E38F gives the error "floating point number too large" #10148
@scabug

Description

@scabug

When you try to define a float with the value 3.4028235E38F you get "error: floating point number too large":

scala> 3.4028235E38F
<console>:1: error: floating point number too large
3.4028235E38F
^

whereas in java everything is fine:

java> 3.4028235E38F
java.lang.Float res0 = 3.4028235E38

you can even define it in scala with java methods:

scala>  java.lang.Float.intBitsToFloat(2139095039)
res0: Float = 3.4028235E38

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0