Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using floating point numbers in prolog!?

Status
Not open for further replies.

erik00

Technical User
Joined
Apr 25, 2003
Messages
1
Location
IL
Hi, i was wondering if i could represent a floating point and perform some basic calculations on it, using prolog...?

Something like this:
some_fact(blah,blah,blah,1.2).
some_fact(blah1,blah1,blah1,1.6).
// it doesn't work.... :
and how to perform basic conculations such as:
10_percent_discount(_before,_after):-_before is _before * 0.9.
// doesn't work too... :
Take Care,
Erik.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top