-4

Lets say i want to find if the relation between the amount of possible triangles with integer angles and quadrilaterals with integer angles can be represented by an exponent. like say T is triangles and Q is quadrilaterals

Q = T^x

Is there a function that I can use to find if i can represent it like that and if possible, what the exponent is?

jaw2233
  • 161
  • 6
  • 1
    Neither is this a Haskell question, nor does it IMO qualify as sufficiently researched. If you flesh this out a bit, it might make a good [Math.SE](http://mathematics.stackexchange.com) or perhaps [CS.SE] question though. – leftaroundabout Jul 18 '16 at 22:32
  • Ah, I ment to be asking if there was a built in function for this. – jaw2233 Jul 18 '16 at 22:34
  • What exactly do you mean by a "non-decimal triangle" or "quadrilateral"? Does `x = log Q / log T` work for you? – ErikR Jul 18 '16 at 22:44
  • Got me again. I ment triangles and quaderlateral shapes with integer angles and i fixed the question to reflect that. My laptop gave out on running the calc on quaderlaterals but im working on another test case. Ill comment the results. – jaw2233 Jul 18 '16 at 22:51
  • That worked but apparently there already is a function for that as stated by the answer, but thanks for showing how it works! – jaw2233 Jul 18 '16 at 22:59

1 Answers1

5

If q = t^x, then x = logBase t q.

Daniel Wagner
  • 145,880
  • 9
  • 220
  • 380