Skip to content

Inconsistent Function EXP in TiDB and TiKV #60841

@bajinsheng

Description

@bajinsheng

Bug Report

1. Minimal reproduce step (Required)

create table t0 (c0 double);
insert into t0 values  (5.84);
select EXP(LN(c0)) <= c0 from t0 where EXP(LN(c0)) <= c0; -- {0}

2. What did you expect to see? (Required)

EXP(LN(c0)) is evaluated to 5.84 in TiKV, but 5.840000000000001 in TiDB, resulting in an unexpected result.
EXP(LN(c0)) <= c0 is evaluated as true in where, which is executed in TiKV, but EXP(LN(c0)) <= c0 is evaluated as false in select.

3. What did you see instead (Required)

0

4. What is your TiDB version? (Required)

+--------------------------------------------+
| version()                                  |
+--------------------------------------------+
| 8.0.11-TiDB-v9.0.0-beta.1.pre-563-gea52376 |
+--------------------------------------------+

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions