From 0e17d168b3ba56f33e713da56eef17a9f9dfcff1 Mon Sep 17 00:00:00 2001
From: "Vladimir V. Kisil" <V.Kisilv@leeds.ac.uk>
Date: Tue, 7 Feb 2023 09:29:07 +0000
Subject: [PATCH] Fix wrong numeric info on transcendental functions.

Although expression like cos(numeric(1, 2)) is not a symbolic,
it neither is numeric in the sense of CLN library. Without
this patch GiNaC crashes on expressions like
cos(cos(ex(1)/ex(2))).

Signed-off-by: Vladimir V. Kisil <V.Kisilv@leeds.ac.uk>
---
 ginac/inifcns_trans.cpp | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/ginac/inifcns_trans.cpp b/ginac/inifcns_trans.cpp
index d9dd4a26..6d32abbb 100644
--- a/ginac/inifcns_trans.cpp
+++ b/ginac/inifcns_trans.cpp
@@ -149,7 +149,6 @@ static ex exp_power(const ex & x, const ex & a)
 static bool exp_info(const ex & x, unsigned inf)
 {
 	switch (inf) {
-	case info_flags::numeric:
 	case info_flags::expanded:
 	case info_flags::real:
 		return x.info(inf);
@@ -389,7 +388,6 @@ static ex log_conjugate(const ex & x)
 static bool log_info(const ex & x, unsigned inf)
 {
 	switch (inf) {
-	case info_flags::numeric:
 	case info_flags::expanded:
 		return x.info(inf);
 	case info_flags::real:
@@ -512,7 +510,6 @@ static ex sin_conjugate(const ex & x)
 static bool trig_info(const ex & x, unsigned inf)
 {
 	switch (inf) {
-	case info_flags::numeric:
 	case info_flags::expanded:
 	case info_flags::real:
 		return x.info(inf);
@@ -834,7 +831,6 @@ static ex asin_conjugate(const ex & x)
 static bool asin_info(const ex & x, unsigned inf)
 {
 	switch (inf) {
-	case info_flags::numeric:
 	case info_flags::expanded:
 		return x.info(inf);
 	default:
@@ -1039,7 +1035,6 @@ static ex atan_conjugate(const ex & x)
 static bool atan_info(const ex & x, unsigned inf)
 {
 	switch (inf) {
-	case info_flags::numeric:
 	case info_flags::expanded:
 	case info_flags::real:
 		return x.info(inf);
@@ -1158,7 +1153,6 @@ static ex atan2_deriv(const ex & y, const ex & x, unsigned deriv_param)
 static bool atan2_info(const ex & y, const ex & x, unsigned inf)
 {
 	switch (inf) {
-	case info_flags::numeric:
 	case info_flags::expanded:
 	case info_flags::real:
 		return y.info(inf) && x.info(inf);
-- 
2.39.1

