cockroachdb / cockroachdb/cockroach

Unexpected -0.0

Open
#145,108 2 comments 0 reactions 0 assignees View on GitHub
branch-release-22.1 C-bug O-community S-3-ux-surprise T-sql-queries
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Describe the problem**

Some mathematical calculations return negative zeros, which seems unexpected.

**To Reproduce**

```sql
testdb=> select 0 * -69.5;
?column?
----------
-0.0
(1 row)
```

**Expected behavior**
The result should be `0.0` without negative symbol.

**Environment:**
- CockroachDB version [7625d9f]
- Server OS: [Linux/Ubuntu]
- Client app [psql]

Jira issue: CRDB-49710

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.