Question: Generate and function constuct with it

Helllo folkx :)

What is wrong in my functions f and g ?

I don't catch the point.

Thanks.

JM--

interface(version);
    Standard Worksheet Interface, Maple 2025.2, Windows 11,
     November 11 2025 Build ID 1971053

with(RandomTools):

Generate(float(range = 2.532000 .. 7.723000, digits = 4));
                             2.537

f := x -> Generate(float(range = 0 .. 100)):

f(30);
                            94.3141

f(0.200000);
                            23.9622

randomize();
                         2413841372727

f(30);
                            86.2657

plot(f(x), x = 1 .. 100.000000);

plots[listplot](sort([seq(Generate(float(range = 0.032100 .. 162.000000, digits = 3)), i = 1 .. 20)]));

plots[listplot](sort([seq(Generate(float(range = 0.032100 .. 162.000000, digits = 3, method = uniform)), i = 1 .. 20)]));

g := ((x -> Generate(float(range = 0 .. x))) assuming (x*float and 0 < x)):

plot(g(x), x = 1 .. 50);
Error, (in RandomTools:-Generate) invalid input: unknown expects value for keyword parameter range to be of type numeric .. numeric, but received 0 .. x

Please Wait...