Deutsch English Français Italiano |
<87h6a5lx30.fsf@nightsong.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Paul Rubin <no.email@nospam.invalid> Newsgroups: comp.lang.python Subject: Re: Beazley's Problem Date: Mon, 23 Sep 2024 17:22:27 -0700 Organization: A noiseless patient Spider Lines: 14 Message-ID: <87h6a5lx30.fsf@nightsong.com> References: <problem-20240921130726@ram.dialup.fu-berlin.de> <87tte941ko.fsf@nightsong.com> <newton-20240921151727@ram.dialup.fu-berlin.de> <87plow4v4p.fsf@nightsong.com> <0709b4b8b0bbf2a32d53649d1a6fbefbcd44a68a.camel@tilde.green> <Newton-20240923132243@ram.dialup.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain Injection-Date: Tue, 24 Sep 2024 02:22:28 +0200 (CEST) Injection-Info: dont-email.me; posting-host="5802c01959a5df245c2a5a0646fadea0"; logging-data="3064986"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19bD/Ky6qZrHVN2Kt4SksBK" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cancel-Lock: sha1:+W6NnIryRoYgTJTkWNoi+hVsfY0= sha1:n+Dy/xANJ0jmSmmHT0mXvHr1hG4= Bytes: 1711 ram@zedat.fu-berlin.de (Stefan Ram) writes: > Nobody up the thread was claiming it was functional. And you can > totally implement anything in an imperative or functional style. Yeah the confusion was because I posted a link to "Why FP Matters", which discusses these sorts of numerical hacks. > def f_prime(x: float) -> float: > return 2*x You might enjoy implementing that with automatic differentiation (not to be confused with symbolic differentiation) instead. http://blog.sigfpe.com/2005/07/automatic-differentiation.html