Skip to content

flsgn inconsistency for -0.0 and +nan.0 #95

@LiberalArtist

Description

@LiberalArtist

The docs claim that flsgn is “like sgn … but restricted to flonum input.” However, the two functions behave differently for -0.0 and +nan.0:

#lang racket
(require math/flonum)

(flsgn -0.0);-> 0.0
(sgn -0.0)  ;-> -0.0

(flsgn +nan.0);-> 0.0
(sgn +nan.0)  ;-> +nan.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions