<div dir="ltr"><div class="gmail_quote">On Mon, Mar 28, 2011 at 19:04, Gaurish Telang <span dir="ltr">&lt;<a href="mailto:gaurish108@gmail.com">gaurish108@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I have some variables in a program some of which are of type PetscReal and some of the type PetscScalar. Is it safe doing arithmetic with these variables without doing any explicit type casting? </blockquote></div><br><div>
Yes, but the result will have type PetscScalar unless you use PetscRealPart() or similar.</div></div>