The math is relatively simple. Each spell has a base cast time. That base time is divided by the user's speed. The number is then rounded down to get the actual cast time. If the user has a Cast quartz, it is then multipled by the Cast quartz value and rounded up this time.Formula:
CEIL(FLOOR(BASE_CAST_TIME/SPD)*(Cast Quartz Effect))
Note that Cold Steel may round down from cast quartz, but in Azure it appears to be rounded up.
Raw data gathered from various guides in Japanese and English. Did some manual testing as well to confirm the cast quartz interaction with delay.
Any error corrections or comments can be made by sending me a pull request.