# Revision history [back]

### how to find root of a spline

Basicaly the title says it: I have data points for which i need to find the x value where y is a known value. I tried it like this, but it seems that it should be done differently:

from sage.gsl.all import spline
data=[[0,1],[1,2],[2,2.2],[3,2.4],[4,0.4],[5,0.1],[6,-0.5]]
func=spline(data)
x=var('x')
find_root(func(x),0,6)
..[Error message with main idea - TypeError: unable to simplify to float approximation]