Skip to content

rewrite fast_float to support more datatypes #5093

@sagetrac-cwitty

Description

@sagetrac-cwitty

I've mentioned several times over the past months that I'm rewriting fast_float. Here's a preliminary patch, that shows the direction I'm taking (automatically generate interpreters for each type, by having Python code write C code).

This version replaces fast_float with the new code, and also adds a new entry point, fast_callable.

fast_callable(EXPR, domain=R)

(where EXPR is a symbolic expression or a polynomial) is essentially equivalent to evaluating EXPR with calls to R() at every node. There's special fast support for domain=RDF or domain=RealField(n), and there's slowish generic code that should work for arbitrary R.

The code is not ready for submission... there are very few doctests, and a lot of the documentation is simply wrong. But if anybody has any comments, I'd be happy to hear them.

CC: @robertwb @jasongrout @sagetrac-bober

Component: basic arithmetic

Issue created by migration from https://trac.sagemath.org/ticket/5093

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions