Red & Green shard formulas

In endless mode, green shards are gained based on the number of gold collected during the one minute explosion. Red shard gain is based on total gold collected before previous activation. The formula is log2(gold/1e9)*log10(gold/1e12). Example values (again, before bonuses):
 * Note: before 1e12 gold the formula is just the log2 part.