Skip to content

math: Add float32 versions of functions (cosf, sinf, fminf, ...) #725

@nico

Description

@nico
Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Use float32s for all your variables
2. Try to compute a cosine

What is the expected output? What do you see instead?

I expected to be able to write

  myfloat32 = math.Cosf(myotherfloat32)

Instead I have to write

  myfloat32 = float32(math.Cos(float64(myotherfloat32)))

This feels clunky and seems to contradict go's "no stuttering" principle.

Which revision are you using?  (hg identify)

6d2593965162 tip

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