JS call function from script not attached to gameobject?

private var equation_script: MarchingCubesJ;

function Start (   ){
var test: float = equation_script.equation1(1, 2, 3);
print(  " test  "+  test);
}

compiles but doesnt work

Are you missing a part in your question?

This is answered hundreds of time.

You have the reference to the script but you still need to find the object and the script.

private var equation_script: MarchingCubesJ;
 
function Start ( ){
   equation_script = GameObject.Find("ObjectName").GetComponent(MarchingCubeJ);
   var test: float = equation_script.equation1(1, 2, 3);
   print( " test "+ test);
}

EDIT: “There isn’t an object to which it is attached”

In this case either your class is static, then you do not need a reference

var test: float = MarchingCubeJ.equation(1,2,3);

or you need to create an instance of it:

var equation_script = new MarchingCubeJ();
var test: float = equation_script.equation1(1, 2, 3);

Finally you can also attach it to any empty game object.

A class simply stored in the project will not do anything.