Skip to content

Some malformed floats do not raise an error, instead evaluate to fail #1105

@fingolfin

Description

@fingolfin

Consider this:

gap> 1.1x;
fail
gap> 1.1;
1.1
gap> 1.x1
Syntax error: Badly formed number
1.x1
  ^

I would expect the first example to raise an error, not return fail.

My guess would be that this is caused by parsing of float expressions in exponent notation, i.e.

gap> 1.1e4;
11000.
gap> 1.1x4;
Syntax error: Badly formed number
1.1x4;
   ^
gap> 1.1x;
fail

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugIssues describing general bugs, and PRs fixing themtopic: parser

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions