Skip to content

Random[] is not random #1221

@rocky

Description

@rocky

Description

Issuing Random[] does not give very random real numbers between 0 and 1.

How to Reproduce and Output given

$ mathics -e 'Table[Random[], {6}]'
{{0.}, {0.}, {4.94066×10^-324}, {0.}, {0.}, {0.}}

Expected behavior

mathics -e 'Table[Random[], {6}]'
{0.0480615, 0.0366987, 0.0705173, 0.283725, 0.84478, 0.138017}

Workarounds

Use RandomReal[] directly

Additional context

Noticed in going over the Combinatorica programs.

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