added chaos_math.js