2 * Copyright (c) 2007 Yahoo! Inc. All rights reserved.
3 * See accompanying LICENSE file.
5 package com
.yahoo
.pig
.builtin
;
7 import java
.io
.IOException
;
9 import com
.yahoo
.pig
.AtomEvalFunc
;
10 import com
.yahoo
.pig
.data
.DataAtom
;
11 import com
.yahoo
.pig
.data
.Tuple
;
13 public class DIVIDE
extends AtomEvalFunc
{
16 public void exec(Tuple input
, DataAtom output
) throws IOException
{
17 double v1
= input
.getAtomField(0).numval();
18 double v2
= input
.getAtomField(1).numval();
19 output
.setValue(v1
/v2
);