Loading...
Searching...
No Matches
SymEngine::EvaluateInfty Class Reference
+ Inheritance diagram for SymEngine::EvaluateInfty:
+ Collaboration diagram for SymEngine::EvaluateInfty:

Private Member Functions

virtual RCP< const Basicsin (const Basic &x) const override
 
virtual RCP< const Basiccos (const Basic &x) const override
 
virtual RCP< const Basictan (const Basic &x) const override
 
virtual RCP< const Basiccot (const Basic &x) const override
 
virtual RCP< const Basicsec (const Basic &x) const override
 
virtual RCP< const Basiccsc (const Basic &x) const override
 
virtual RCP< const Basicasin (const Basic &x) const override
 
virtual RCP< const Basicacos (const Basic &x) const override
 
virtual RCP< const Basicacsc (const Basic &x) const override
 
virtual RCP< const Basicasec (const Basic &x) const override
 
virtual RCP< const Basicatan (const Basic &x) const override
 
virtual RCP< const Basicacot (const Basic &x) const override
 
virtual RCP< const Basicsinh (const Basic &x) const override
 
virtual RCP< const Basiccsch (const Basic &x) const override
 
virtual RCP< const Basiccosh (const Basic &x) const override
 
virtual RCP< const Basicsech (const Basic &x) const override
 
virtual RCP< const Basictanh (const Basic &x) const override
 
virtual RCP< const Basiccoth (const Basic &x) const override
 
virtual RCP< const Basicasinh (const Basic &x) const override
 
virtual RCP< const Basicacosh (const Basic &x) const override
 
virtual RCP< const Basicacsch (const Basic &x) const override
 
virtual RCP< const Basicasech (const Basic &x) const override
 
virtual RCP< const Basicatanh (const Basic &x) const override
 
virtual RCP< const Basicacoth (const Basic &x) const override
 
virtual RCP< const Basicabs (const Basic &x) const override
 
virtual RCP< const Basiclog (const Basic &x) const override
 
virtual RCP< const Basicgamma (const Basic &x) const override
 
virtual RCP< const Basicexp (const Basic &x) const override
 
virtual RCP< const Basicfloor (const Basic &x) const override
 
virtual RCP< const Basicceiling (const Basic &x) const override
 
virtual RCP< const Basictruncate (const Basic &x) const override
 
virtual RCP< const Basicerf (const Basic &x) const override
 
virtual RCP< const Basicerfc (const Basic &x) const override
 

Additional Inherited Members

virtual RCP< const Basicsin (const Basic &) const =0
 
virtual RCP< const Basiccos (const Basic &) const =0
 
virtual RCP< const Basictan (const Basic &) const =0
 
virtual RCP< const Basiccot (const Basic &) const =0
 
virtual RCP< const Basicsec (const Basic &) const =0
 
virtual RCP< const Basiccsc (const Basic &) const =0
 
virtual RCP< const Basicasin (const Basic &) const =0
 
virtual RCP< const Basicacos (const Basic &) const =0
 
virtual RCP< const Basicatan (const Basic &) const =0
 
virtual RCP< const Basicacot (const Basic &) const =0
 
virtual RCP< const Basicasec (const Basic &) const =0
 
virtual RCP< const Basicacsc (const Basic &) const =0
 
virtual RCP< const Basicsinh (const Basic &) const =0
 
virtual RCP< const Basiccsch (const Basic &) const =0
 
virtual RCP< const Basiccosh (const Basic &) const =0
 
virtual RCP< const Basicsech (const Basic &) const =0
 
virtual RCP< const Basictanh (const Basic &) const =0
 
virtual RCP< const Basiccoth (const Basic &) const =0
 
virtual RCP< const Basicasinh (const Basic &) const =0
 
virtual RCP< const Basicacsch (const Basic &) const =0
 
virtual RCP< const Basicacosh (const Basic &) const =0
 
virtual RCP< const Basicatanh (const Basic &) const =0
 
virtual RCP< const Basicacoth (const Basic &) const =0
 
virtual RCP< const Basicasech (const Basic &) const =0
 
virtual RCP< const Basiclog (const Basic &) const =0
 
virtual RCP< const Basicgamma (const Basic &) const =0
 
virtual RCP< const Basicabs (const Basic &) const =0
 
virtual RCP< const Basicexp (const Basic &) const =0
 
virtual RCP< const Basicfloor (const Basic &) const =0
 
virtual RCP< const Basicceiling (const Basic &) const =0
 
virtual RCP< const Basictruncate (const Basic &) const =0
 
virtual RCP< const Basicerf (const Basic &) const =0
 
virtual RCP< const Basicerfc (const Basic &) const =0
 

Detailed Description

Definition at line 232 of file infinity.cpp.

Member Function Documentation

◆ abs()

virtual RCP< const Basic > SymEngine::EvaluateInfty::abs ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 432 of file infinity.cpp.

433 {
434 SYMENGINE_ASSERT(is_a<Infty>(x))
435 return Inf;
436 }

◆ acos()

virtual RCP< const Basic > SymEngine::EvaluateInfty::acos ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 269 of file infinity.cpp.

270 {
271 SYMENGINE_ASSERT(is_a<Infty>(x))
272 throw DomainError("acos is not defined for infinite values");
273 }

◆ acosh()

virtual RCP< const Basic > SymEngine::EvaluateInfty::acosh ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 380 of file infinity.cpp.

381 {
382 SYMENGINE_ASSERT(is_a<Infty>(x))
383 const Infty &s = down_cast<const Infty &>(x);
384 if (s.is_positive() or s.is_negative()) {
385 return Inf;
386 } else {
387 throw DomainError("acosh is not defined for Complex Infinity");
388 }
389 }

◆ acot()

virtual RCP< const Basic > SymEngine::EvaluateInfty::acot ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 296 of file infinity.cpp.

297 {
298 SYMENGINE_ASSERT(is_a<Infty>(x))
299 const Infty &s = down_cast<const Infty &>(x);
300 if (s.is_positive() or s.is_negative()) {
301 return zero;
302 } else {
303 throw DomainError("acot is not defined for Complex Infinity");
304 }
305 }

◆ acoth()

virtual RCP< const Basic > SymEngine::EvaluateInfty::acoth ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 422 of file infinity.cpp.

423 {
424 SYMENGINE_ASSERT(is_a<Infty>(x))
425 const Infty &s = down_cast<const Infty &>(x);
426 if (s.is_positive() or s.is_negative()) {
427 return zero;
428 } else {
429 throw DomainError("acoth is not defined for Complex Infinity");
430 }
431 }

◆ acsc()

virtual RCP< const Basic > SymEngine::EvaluateInfty::acsc ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 274 of file infinity.cpp.

275 {
276 SYMENGINE_ASSERT(is_a<Infty>(x))
277 throw DomainError("acsc is not defined for infinite values");
278 }

◆ acsch()

virtual RCP< const Basic > SymEngine::EvaluateInfty::acsch ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 390 of file infinity.cpp.

391 {
392 SYMENGINE_ASSERT(is_a<Infty>(x))
393 const Infty &s = down_cast<const Infty &>(x);
394 if (s.is_positive() or s.is_negative()) {
395 return zero;
396 } else {
397 throw DomainError("acsch is not defined for Complex Infinity");
398 }
399 }

◆ asec()

virtual RCP< const Basic > SymEngine::EvaluateInfty::asec ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 279 of file infinity.cpp.

280 {
281 SYMENGINE_ASSERT(is_a<Infty>(x))
282 throw DomainError("asec is not defined for infinite values");
283 }

◆ asech()

virtual RCP< const Basic > SymEngine::EvaluateInfty::asech ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 400 of file infinity.cpp.

401 {
402 SYMENGINE_ASSERT(is_a<Infty>(x))
403 const Infty &s = down_cast<const Infty &>(x);
404 if (s.is_positive() or s.is_negative()) {
405 return mul(mul(I, pi), div(one, integer(2)));
406 } else {
407 throw DomainError("asech is not defined for Complex Infinity");
408 }
409 }
RCP< const Basic > div(const RCP< const Basic > &a, const RCP< const Basic > &b)
Division.
Definition: mul.cpp:431
RCP< const Basic > mul(const RCP< const Basic > &a, const RCP< const Basic > &b)
Multiplication.
Definition: mul.cpp:352
std::enable_if< std::is_integral< T >::value, RCP< constInteger > >::type integer(T i)
Definition: integer.h:200

◆ asin()

virtual RCP< const Basic > SymEngine::EvaluateInfty::asin ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 264 of file infinity.cpp.

265 {
266 SYMENGINE_ASSERT(is_a<Infty>(x))
267 throw DomainError("asin is not defined for infinite values");
268 }

◆ asinh()

virtual RCP< const Basic > SymEngine::EvaluateInfty::asinh ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 370 of file infinity.cpp.

371 {
372 SYMENGINE_ASSERT(is_a<Infty>(x))
373 const Infty &s = down_cast<const Infty &>(x);
374 if (s.is_positive() or s.is_negative()) {
375 return infty(s.get_direction());
376 } else {
377 throw DomainError("asinh is not defined for Complex Infinity");
378 }
379 }

◆ atan()

virtual RCP< const Basic > SymEngine::EvaluateInfty::atan ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 284 of file infinity.cpp.

285 {
286 SYMENGINE_ASSERT(is_a<Infty>(x))
287 const Infty &s = down_cast<const Infty &>(x);
288 if (s.is_positive()) {
289 return div(pi, integer(2));
290 } else if (s.is_negative()) {
291 return mul(minus_one, (div(pi, integer(2))));
292 } else {
293 throw DomainError("atan is not defined for Complex Infinity");
294 }
295 }

◆ atanh()

virtual RCP< const Basic > SymEngine::EvaluateInfty::atanh ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 410 of file infinity.cpp.

411 {
412 SYMENGINE_ASSERT(is_a<Infty>(x))
413 const Infty &s = down_cast<const Infty &>(x);
414 if (s.is_positive()) {
415 return mul(minus_one, div(mul(pi, I), integer(2)));
416 } else if (s.is_negative()) {
417 return div(mul(pi, I), integer(2));
418 } else {
419 throw DomainError("atanh is not defined for Complex Infinity");
420 }
421 }

◆ ceiling()

virtual RCP< const Basic > SymEngine::EvaluateInfty::ceiling ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 481 of file infinity.cpp.

482 {
483 SYMENGINE_ASSERT(is_a<Infty>(x))
484 const Infty &s = down_cast<const Infty &>(x);
485 if (s.is_positive()) {
486 return Inf;
487 } else if (s.is_negative()) {
488 return NegInf;
489 } else {
490 throw DomainError("ceiling is not defined for Complex Infinity");
491 }
492 }

◆ cos()

virtual RCP< const Basic > SymEngine::EvaluateInfty::cos ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 239 of file infinity.cpp.

240 {
241 SYMENGINE_ASSERT(is_a<Infty>(x))
242 throw DomainError("cos is not defined for infinite values");
243 }

◆ cosh()

virtual RCP< const Basic > SymEngine::EvaluateInfty::cosh ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 326 of file infinity.cpp.

327 {
328 SYMENGINE_ASSERT(is_a<Infty>(x))
329 const Infty &s = down_cast<const Infty &>(x);
330 if (s.is_positive() or s.is_negative()) {
331 return Inf;
332 } else {
333 throw DomainError("cosh is not defined for Complex Infinity");
334 }
335 }

◆ cot()

virtual RCP< const Basic > SymEngine::EvaluateInfty::cot ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 249 of file infinity.cpp.

250 {
251 SYMENGINE_ASSERT(is_a<Infty>(x))
252 throw DomainError("cot is not defined for infinite values");
253 }

◆ coth()

virtual RCP< const Basic > SymEngine::EvaluateInfty::coth ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 358 of file infinity.cpp.

359 {
360 SYMENGINE_ASSERT(is_a<Infty>(x))
361 const Infty &s = down_cast<const Infty &>(x);
362 if (s.is_positive()) {
363 return one;
364 } else if (s.is_negative()) {
365 return minus_one;
366 } else {
367 throw DomainError("coth is not defined for Complex Infinity");
368 }
369 }

◆ csc()

virtual RCP< const Basic > SymEngine::EvaluateInfty::csc ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 259 of file infinity.cpp.

260 {
261 SYMENGINE_ASSERT(is_a<Infty>(x))
262 throw DomainError("csc is not defined for infinite values");
263 }

◆ csch()

virtual RCP< const Basic > SymEngine::EvaluateInfty::csch ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 316 of file infinity.cpp.

317 {
318 SYMENGINE_ASSERT(is_a<Infty>(x))
319 const Infty &s = down_cast<const Infty &>(x);
320 if (s.is_positive() or s.is_negative()) {
321 return zero;
322 } else {
323 throw DomainError("csch is not defined for Complex Infinity");
324 }
325 }

◆ erf()

virtual RCP< const Basic > SymEngine::EvaluateInfty::erf ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 505 of file infinity.cpp.

506 {
507 SYMENGINE_ASSERT(is_a<Infty>(x))
508 const Infty &s = down_cast<const Infty &>(x);
509 if (s.is_positive()) {
510 return one;
511 } else if (s.is_negative()) {
512 return minus_one;
513 } else {
514 throw DomainError("erf is not defined for Complex Infinity");
515 }
516 }

◆ erfc()

virtual RCP< const Basic > SymEngine::EvaluateInfty::erfc ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 517 of file infinity.cpp.

518 {
519 SYMENGINE_ASSERT(is_a<Infty>(x))
520 const Infty &s = down_cast<const Infty &>(x);
521 if (s.is_positive()) {
522 return zero;
523 } else if (s.is_negative()) {
524 return integer(2);
525 } else {
526 throw DomainError("erfc is not defined for Complex Infinity");
527 }
528 }

◆ exp()

virtual RCP< const Basic > SymEngine::EvaluateInfty::exp ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 457 of file infinity.cpp.

458 {
459 SYMENGINE_ASSERT(is_a<Infty>(x))
460 const Infty &s = down_cast<const Infty &>(x);
461 if (s.is_positive()) {
462 return Inf;
463 } else if (s.is_negative()) {
464 return zero;
465 } else {
466 throw DomainError("exp is not defined for Complex Infinity");
467 }
468 }

◆ floor()

virtual RCP< const Basic > SymEngine::EvaluateInfty::floor ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 469 of file infinity.cpp.

470 {
471 SYMENGINE_ASSERT(is_a<Infty>(x))
472 const Infty &s = down_cast<const Infty &>(x);
473 if (s.is_positive()) {
474 return Inf;
475 } else if (s.is_negative()) {
476 return NegInf;
477 } else {
478 throw DomainError("floor is not defined for Complex Infinity");
479 }
480 }

◆ gamma()

virtual RCP< const Basic > SymEngine::EvaluateInfty::gamma ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 447 of file infinity.cpp.

448 {
449 SYMENGINE_ASSERT(is_a<Infty>(x))
450 const Infty &s = down_cast<const Infty &>(x);
451 if (s.is_positive()) {
452 return Inf;
453 } else {
454 return ComplexInf;
455 }
456 }

◆ log()

virtual RCP< const Basic > SymEngine::EvaluateInfty::log ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 437 of file infinity.cpp.

438 {
439 SYMENGINE_ASSERT(is_a<Infty>(x))
440 const Infty &s = down_cast<const Infty &>(x);
441 if (s.is_positive() or s.is_negative()) {
442 return Inf;
443 } else {
444 return ComplexInf;
445 }
446 }

◆ sec()

virtual RCP< const Basic > SymEngine::EvaluateInfty::sec ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 254 of file infinity.cpp.

255 {
256 SYMENGINE_ASSERT(is_a<Infty>(x))
257 throw DomainError("sec is not defined for infinite values");
258 }

◆ sech()

virtual RCP< const Basic > SymEngine::EvaluateInfty::sech ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 336 of file infinity.cpp.

337 {
338 SYMENGINE_ASSERT(is_a<Infty>(x))
339 const Infty &s = down_cast<const Infty &>(x);
340 if (s.is_positive() or s.is_negative()) {
341 return zero;
342 } else {
343 throw DomainError("sech is not defined for Complex Infinity");
344 }
345 }

◆ sin()

virtual RCP< const Basic > SymEngine::EvaluateInfty::sin ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 234 of file infinity.cpp.

235 {
236 SYMENGINE_ASSERT(is_a<Infty>(x))
237 throw DomainError("sin is not defined for infinite values");
238 }

◆ sinh()

virtual RCP< const Basic > SymEngine::EvaluateInfty::sinh ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 306 of file infinity.cpp.

307 {
308 SYMENGINE_ASSERT(is_a<Infty>(x))
309 const Infty &s = down_cast<const Infty &>(x);
310 if (s.is_positive() or s.is_negative()) {
311 return infty(s.get_direction());
312 } else {
313 throw DomainError("sinh is not defined for Complex Infinity");
314 }
315 }

◆ tan()

virtual RCP< const Basic > SymEngine::EvaluateInfty::tan ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 244 of file infinity.cpp.

245 {
246 SYMENGINE_ASSERT(is_a<Infty>(x))
247 throw DomainError("tan is not defined for infinite values");
248 }

◆ tanh()

virtual RCP< const Basic > SymEngine::EvaluateInfty::tanh ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 346 of file infinity.cpp.

347 {
348 SYMENGINE_ASSERT(is_a<Infty>(x))
349 const Infty &s = down_cast<const Infty &>(x);
350 if (s.is_positive()) {
351 return one;
352 } else if (s.is_negative()) {
353 return minus_one;
354 } else {
355 throw DomainError("tanh is not defined for Complex Infinity");
356 }
357 }

◆ truncate()

virtual RCP< const Basic > SymEngine::EvaluateInfty::truncate ( const Basic x) const
inlineoverrideprivatevirtual

Implements SymEngine::Evaluate.

Definition at line 493 of file infinity.cpp.

494 {
495 SYMENGINE_ASSERT(is_a<Infty>(x))
496 const Infty &s = down_cast<const Infty &>(x);
497 if (s.is_positive()) {
498 return Inf;
499 } else if (s.is_negative()) {
500 return NegInf;
501 } else {
502 throw DomainError("truncate is not defined for Complex Infinity");
503 }
504 }

The documentation for this class was generated from the following file: