Get raw price inside custom print format

Hey everyone,

I hope that I did not oversee anything, but until now i could find a solution to this:

I’m optimizing my custom print format and therefor I need to do some individual calculations with the prices (and taxes).
Unfortunately the following command is just giving me the price as a string together with the currency symbol:

doc.grand_total

Is there an easy way of getting any price as a raw value (e.g. float) to use this for calculation puproses?

Thank you in advance!