TODO

概要

  • シンボリック処理

リンク

Cのコード生成とかLatexがすごい

from __future__ import division
from sympy import *
from sympy.utilities.codegen import *

x, y, z=symbols('x y z')
print(sqrt(x))
[(c_name, c_code), (h_name, c_header)] = codegen(("f", sqrt(x*x+y*y+z*z)), "C", "test")
print(c_code)
print(c_header)

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2017-12-27 (水) 09:10:21 (2315d)