Skip to content

Float problem. #7

@imi187

Description

@imi187

When entering a float value such as 1.0 via the CouchDB interface, the value is stored and recognized internally as a float. However, the interface displays this value as an integer (1). This leads to a mismatch where some migrations or applications expect a float type, but the interface shows an integer, causing confusion and potential errors in workflows relying on strict type distinctions.

Steps to reproduce:

Insert or update a document field with a float value, e.g., 1.0, using the CouchDB web interface.

Save the document.

Reload or view the document again in the interface.

Observe that the value is displayed as 1 (integer) instead of 1.0 (float), although internally it is treated as a float.

Expected behavior:
The interface should display the value exactly as stored, preserving the float format (1.0) when applicable, to avoid confusion and ensure consistency with backend data types.

Actual behavior:
The interface converts or formats the float value 1.0 to integer 1 when displaying it, while internally keeping it as a float.

Impact:
This inconsistency causes problems in systems that rely on type-specific values, such as migrations or applications that expect floats or integer. It can lead to bugs or data handling errors due to incorrect assumptions about the data type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions