title: Getting SWI-Prolog to convert Literal to number
body: <p>It will be quite a miracle if someone could help with the following...</p>
  
  <p>I'm using SWI-Prolog to perform queries in a triples RDF file. The values can be queried, but instead of just a number, the word Literal shows up in front of them (e.g [literal(500000)] shows up for the value 500000). Now, the problem arises when I have a list of numbers that I want to add. I try to convert these Literals into atoms so that Prolog can recognize them as numbers, but get the following error </p>
  
  <p>ERROR: atom_number/2: Type error: atom' expected, found [literal(500000)]'</p>
  
  <p>Any clues would be appreciated. Thanks.</p>