Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
20939: fix NaN handling
Browse files Browse the repository at this point in the history
  • Loading branch information
rwst committed Nov 14, 2016
1 parent 55deed7 commit 31e6c64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sage/libs/pynac/constant.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ cdef class PynacConstant:
self.pointer = <GConstant *>&g_Catalan
elif self._name == "euler_gamma":
self.pointer = <GConstant *>&g_Euler
elif self._name == "NaN":
self.pointer = <GConstant *>&g_NaN
else:
GConstant_construct(&self.object, name, texname, domain)
self.pointer = &self.object
Expand Down
1 change: 1 addition & 0 deletions src/sage/libs/pynac/pynac.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ cdef extern from "sage/libs/pynac/wrap.h":
GEx g_Pi "Pi"
GEx g_Catalan "Catalan"
GEx g_Euler "Euler"
GEx g_NaN "NaN"

GConstant* GConstant_construct(void *mem, char* name, char* texname, unsigned domain)
bint is_a_constant "is_a<constant>" (GEx e)
Expand Down

0 comments on commit 31e6c64

Please sign in to comment.