Use degrees instead of radians.
45 degrees is Pi/4 radians ~= 0.785398.
y in your formula should be the object's distance above the ground when it is released. Is the ground 0? If the ground is not at y=0, then y should be:
y = origin.Position.y + groundHeight
Finally, are you sure that this formula is giving you what you want? This formula gives the horizontal distance of the object's travel only -- not the distance of the object along the path (which is longer or equal to the horizontal travel).
Based on your response, it sounds like you're actually looking for the maximum possible distance that can be achieved.
To find the angle that gives the maximum possible distance, use this (using your variable names):
a = arccos(sqrt((2*g*y + v*v)/(2*g*y + 2*v*v)))
Now you can plug
a into the equation you already have to find what the distance is at that angle.
Now you have both the angle that produces the maximum distance, and the maximum possible distance itself!
g = 30, y = 3.85, v = 35, gives:
Wolfram Alpha computation.
a = 0.7422637 radians = 42.53 degrees.
Then plugging a into your original formula gives range = 44.517.