FindRoot and Compile
- To: mathgroup at smc.vnet.net
- Subject: [mg46854] FindRoot and Compile
- From: Matthias Gottschalk <gottschalk at gfz-potsdam.de>
- Date: Fri, 12 Mar 2004 02:02:40 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
The following used to work in 4.2
y = Compile[{x}, x^2 - 2 == 0]
FindRoot[y[x], {x, .9}]
{x -> 1.41421}
With 5.01 I get the Message:
CompiledFunction::cfsa: "Argument x at position 1 should be a
machine-size real number"
In this case I did not get the trick with_?NumericQ to work . Maybe I
am not doing it correctly.
Any suggestions?
Thanks
Matthias
--
PD Dr. Matthias Gottschalk
GeoForschungsZentrum
Projektbereich 4.1
Telegrafenberg
14473 Potsdam
Germany
tel/fax +49 (0) 331 288-1418/1402