Skip to content

math/ulp: data interval #29

@chenxuqiang

Description

@chenxuqiang

I have a question. In the ulp program, we formulate the data interval [-0.5, 1.0] for the program, but the value of the data in the program will exceed this interval, as shown below:
#./ulp -e 0.5 -r n -f atan2 -0.5 1.0 x -0.5 1.0 1000
atan2(-758032640005901072196627021490030084817733292767880968699295757878579464642193680699563542925245279209783296.0000000000000000, -98853056707272881102131689990518198269559039123449359701054226822449015051621586121797799515563919741145680595210207232.0000000000000000) got -98853056707272881102131689990518198269559039123449359701054226822449015051621586121797799515563919741145680595210207232.0000000000000000, want -3.1415926535821250 tail = +0.149384, ulp err -2.22597e+134
Because g->len = b-a gets a very large number, g->start + randn(g->len) is an uncontrolled number.
This is no problem in the interval [0.5, 1.0], because b-a gets the number of machines in [a, b]. But it is not applicable for the interval [-0.5, 1.0].

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