Drkcore

07 06 2009 Python fortran Tweet

符号付け替え関数

fortranの組み込み関数にsignという符号付け替え関数が用意されている。

def sign(a1,a2):
    if a2 >= 0: return abs(a1)
    else:       return -abs(a1)

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021